Olá,
Recentemente meu primo precisou um Visual Basic Script que verifica se um processo está executando e caso esteja envie um e-mail. Ele me pediu ajuda para criar este script e eu resolvi ajudar.
Visual Basic Script para verificação de processo em execução e notificação via E-mail.
Verificar se um processo está em execução com Visual Basic Script e mostrar uma janela se estiver.
[code lang=”vb”]
set service = GetObject (“winmgmts:”)
for each Process in Service.InstancesOf (“Win32_Process”)
If Process.Name = processName then
wscript.echo “Notepad running”
wscript.quit
End If
next
[/code]
Enviar e-mail utilizando Visual Basic Script:
[code lang=”vb”]
Const username = “SENHA”
Const password = “PASSWORD”
Const smtpServer = “smtp.gmail.com”
Const port = 465
Const secure = True
Const userFrom = “FROM”
Const userTo = “TO”
Const emailSubject = “Subject”
Const emailText = “Text”
‘== CODE ==
Const cdoSendUsingPickup = 1 ‘Send message using the local SMTP service pickup directory.
Const cdoSendUsingPort = 2 ‘Send the message using the network (SMTP over the network).
Const cdoAnonymous = 0 ‘Do not authenticate
Const cdoBasic = 1 ‘basic (clear-text) authentication
Const cdoNTLM = 2 ‘NTLM
Set objMessage = CreateObject(“CDO.Message”)
objMessage.Subject = emailSubject
objMessage.From = userFrom
objMessage.To = userTo
objMessage.TextBody = emailText
‘==This section provides the configuration information for the remote SMTP server.
objMessage.Configuration.Fields.Item _
(“http://schemas.microsoft.com/cdo/configuration/sendusing”) = 2
‘Name or IP of Remote SMTP Servesr
objMessage.Configuration.Fields.Item _
(“http://schemas.microsoft.com/cdo/configuration/smtpserver”) = smtpServer
‘Type of authentication, NONE, Basic (Base64 encoded), NTLM
objMessage.Configuration.Fields.Item _
(“http://schemas.microsoft.com/cdo/configuration/smtpauthenticate”) = cdoBasic
‘Your UserID on the SMTP server
objMessage.Configuration.Fields.Item _
(“http://schemas.microsoft.com/cdo/configuration/sendusername”) = username
‘Your password on the SMTP server
objMessage.Configuration.Fields.Item _
(“http://schemas.microsoft.com/cdo/configuration/sendpassword”) = password
‘Server port (typically 25)
objMessage.Configuration.Fields.Item _
(“http://schemas.microsoft.com/cdo/configuration/smtpserverport”) = port
‘Use SSL for the connection (False or True)
objMessage.Configuration.Fields.Item _
(“http://schemas.microsoft.com/cdo/configuration/smtpusessl”) = secure
‘Connection Timeout in seconds (the maximum time CDO will try to establish a connection to the SMTP server)
objMessage.Configuration.Fields.Item _
(“http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout”) = 60
objMessage.Configuration.Fields.Update
objMessage.Send
[/code]
Estes dois scripts foram mesclados para realizar o que precisávamos.
Abraços,
Matheus
Referencias:
http://wiki.imacros.net/send-email.vbs
http://www.techimo.com/forum/applications-operating-systems/117464-need-vbulletin-script-check-see-if-process-running.html
сайт [url=https://platinashop.com]chatgpt plus 3 месяца[/url]
casino mit auszahlung ohne limit
Feel free to visit my homepage; spielothek schleswig Holstein (gastroairtech.de)
Hey Miami crew Some give you dirty cars with dents all over Went through like 12 companies over the past two years These guys know what they’re doing — luxury car rental miami florida best deals Pickup and dropoff hassle-free Anyway, full info is right here — luxury car rental miami south beach [url=https://www.pinterest.com/pin/1092122978527737201]https://www.pinterest.com/pin/1092122978527737201[/url] Go with the ones who actually care Share this with anyone heading to Miami in style
online casino bestenliste deutschland (Surbhisakshidevelopers.com) echtgeld paysafecard
Схема помощи зависит от состояния, стажа употребления, противопоказаний и дальнейших целей лечения.
Подробнее тут – [url=https://vyvod-iz-zapoya-v-statsionare-v-gelendzhike1.ru/]стационар вывод из запоя в геленджике[/url]
So — been on this thing for maybe five months now and it’s basically bookmarked at this point, so figured I’d chuck my thoughts in since someone asked me the other day. I’m in the UK, generally do football and horses, nothing mad, so take it how you like.
How I found it was honestly embarrassing — I could never work out what an ew payout actually was once you get five places instead of three. I used to just eyeball it and moan when the payout landed. Now I type the odds in before I place anything, even the boring singles.
The single bet calculator tool is the part I open most — type in stake and odds and you get returns instantly, fractions or decimals. There’s also the bigger stuff — trebles returns, lucky 15s, yankees, which is where I’d always mess it up. Have a go yourself, it’s over at [url=https://freebet-calculator.com/bet-calculator/trixie]irish lotto trixie bet[/url] — free, no signup.
One thing that genuinely shifted things for me were the nerdier bits. The odds-to-probability thing and it makes obvious what margin’s baked in, and there’s the kelly criterion tool — I run quarter kelly because full kelly is a quick route to a dead bankroll. Dutching calculator gets used a fair bit for when I’m spreading across selections.
Couple of gripes. Its design is very functional, let’s say — no frills, which honestly I don’t mind but some will. On my phone it’s usable but the bigger tables are a squeeze. There’s no app, it’s a website and that’s it — fine by me but you asked.
Anyway. Costs nowt, not plastered in adverts, does what it says. Anyone who still adds it up in their head, give it a go — saved me a fair few “wait, that’s it?” moments.