computergroove Posted December 15, 2011 Share Posted December 15, 2011 I have a restaurant owner who had 6 registers and there is an employee who is unplugging one of the terminals so they can steal money. The installation is on a peer to peer network where there are 6 windows xp pro terminals and a server xp pro server. I want to run a script from the server to the ip address of the computer that keeps getting unplugged and when it becomes disconnected I want an email sent to me immediately. I am browsing through the autoit functions and I cannot see a smtp option to use in a script. Has anyone made a program like this or is there any info on sending an email to a gmail account from the script? Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html Link to comment Share on other sites More sharing options...
Developers Jos Posted December 15, 2011 Developers Share Posted December 15, 2011 Search for _InetSmtpMailCom() in the examples forum. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
sleepydvdr Posted December 16, 2011 Share Posted December 16, 2011 Another idea is to install video cameras to actually catch them in the act. A script that alerts you by email that a computer network connection is unplugged is not very good evidence. #include <ByteMe.au3> Link to comment Share on other sites More sharing options...
Clark Posted December 16, 2011 Share Posted December 16, 2011 From the Help file: <autoit>#include <INet.au3> $s_SmtpServer = "mysmtpserver.com.au" $s_FromName = "My Name" $s_FromAddress = "From eMail Address" $s_ToAddress = "To eMail Address" $s_Subject = "My Test UDF" Dim $as_Body[2] $as_Body[0] = "Testing the new email udf" $as_Body[1] = "Second Line" $Response = _INetSmtpMail ($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body) $err = @error If $Response = 1 Then MsgBox(0, "Success!", "Mail sent") Else MsgBox(0, "Error!", "Mail failed with error code " & $err) EndIf </autoit> Link to comment Share on other sites More sharing options...
computergroove Posted December 26, 2011 Author Share Posted December 26, 2011 Will this work without a password from the email account in Gmail? Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html Link to comment Share on other sites More sharing options...
Beege Posted December 26, 2011 Share Posted December 26, 2011 No. Gmail would need a password. Jos's example should work for Gmail. I would also look into using SMS. The same function can be used to send a txt message to his phone. The owner would most likely recive a txt quicker then an email. Assembly Code: fasmg . fasm . BmpSearch . Au3 Syntax Highlighter . Bounce Multithreading Example . IDispatchASMUDFs: Explorer Frame . ITaskBarList . Scrolling Line Graph . Tray Icon Bar Graph . Explorer Listview . Wiimote . WinSnap . Flicker Free Labels . iTunesPrograms: Ftp Explorer . Snipster . Network Meter . Resistance Calculator Link to comment Share on other sites More sharing options...
computergroove Posted December 27, 2011 Author Share Posted December 27, 2011 No. Gmail would need a password. Jos's example should work for Gmail. I would also look into using SMS. The same function can be used to send a txt message to his phone. The owner would most likely recive a txt quicker then an email.How do I send a txt message from an autoit script? Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html Link to comment Share on other sites More sharing options...
Beege Posted December 28, 2011 Share Posted December 28, 2011 How do I send a txt message from an autoit script?The same way you send an email. You just need to know the persons cell service provider. For example if his provider is verizon, the email address you would send the txt to would be ##########@vtext.com. The "###" being his phone number. Check out the UDF below. It has like every provider address you can think of. Assembly Code: fasmg . fasm . BmpSearch . Au3 Syntax Highlighter . Bounce Multithreading Example . IDispatchASMUDFs: Explorer Frame . ITaskBarList . Scrolling Line Graph . Tray Icon Bar Graph . Explorer Listview . Wiimote . WinSnap . Flicker Free Labels . iTunesPrograms: Ftp Explorer . Snipster . Network Meter . Resistance Calculator Link to comment Share on other sites More sharing options...
PowerCat Posted January 5, 2012 Share Posted January 5, 2012 You can use a loop with PING and when the ping fails, it sends you an email Link to comment Share on other sites More sharing options...
arcker Posted January 6, 2012 Share Posted January 6, 2012 agree with powercat, simple and efficient. -- Arck System _ Soon -- Ideas make everything "La critique est facile, l'art est difficile" Projects :[list] [*]Au3Service : Run your exe as service V3 / Updated 29/07/2013 Get it Here [/list] Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now