JSThePatriot Posted September 15, 2004 Author Share Posted September 15, 2004 Run(@tempdir & "\bmail.exe -s smtp.advances.net -t patriot@the-patriot.net -f admin@the-patriot.net -a IPAddress -b " & @ComputerName & " " & $nip) <{POST_SNAPBACK}>I did that... hehe. It then only puts in my computer name. I have another idea... I am going to try to either put all of that in a variable that way it is only one thing, or I will write the information to a file and it will use a file for the body of the email One way or another this will behave. I will let you know how I get along. Thanks for the thoughtful fix JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Link to comment Share on other sites More sharing options...
Developers Jos Posted September 15, 2004 Developers Share Posted September 15, 2004 I did that... hehe. It then only puts in my computer name. I have another idea... I am going to try to either put all of that in a variable that way it is only one thing, or I will write the information to a file and it will use a file for the body of the email One way or another this will behave. I will let you know how I get along. Thanks for the thoughtful fix JS <{POST_SNAPBACK}>lost you ... don't understand what you want to do with the space .... 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...
JSThePatriot Posted September 15, 2004 Author Share Posted September 15, 2004 lost you ... don't understand what you want to do with the space .... <{POST_SNAPBACK}>This is the code I just tried... While 1 $nip = _TakeIP() If @error Then Sleep($pause) ContinueLoop EndIf If $nip <> $oip Then Fileinstall("bmail.exe", @tempdir & "\bmail.exe") Local $body $body = "This is " & @ComputerName & "'s IP Address: " & $nip Run(@tempdir & "\bmail.exe -s smtp.advances.net -t patriot@the-patriot.net -f admin@the-patriot.net -a IPAddress -b " & $body) Filedelete(@tempdir & "\bmail.exe") EndIf $oip = _TakeIP() Sleep($pause) Wend I want the body of the email to read as follows... This is COMPUTERNAME's IP Address: IPADDYHERERight now the only way I can get it to work is without spaces. So it looks like one of the following... ThisisCOMPUTERNAME'sIPAddress:123.123.123.123or COMPUTERNAME123.123.123.123See? I just want it in an easy to read format. I cant seem to get that. Every thing disappears after the first space. Somehow I need to surround the whole thing after the variables have been turned into text and number in quotation marks (I think that would fix it, but I dont know how to do that). My next step if I cant get it by itself or use a variable is to try and write the ComputerName and IP to a file with the appropriate body that I want and then use that as the body of the email since that is an option with bmail. Thanks, JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Link to comment Share on other sites More sharing options...
Developers Jos Posted September 15, 2004 Developers Share Posted September 15, 2004 (edited) This is the code I just tried... I want the body of the email to read as follows... Right now the only way I can get it to work is without spaces. So it looks like one of the following... or See? I just want it in an easy to read format. I cant seem to get that. Every thing disappears after the first space. Somehow I need to surround the whole thing after the variables have been turned into text and number in quotation marks (I think that would fix it, but I dont know how to do that). My next step if I cant get it by itself or use a variable is to try and write the ComputerName and IP to a file with the appropriate body that I want and then use that as the body of the email since that is an option with bmail. Thanks, JS <{POST_SNAPBACK}>give this a try... it will put double quotes around the text...: $body = "This is " & @ComputerName & "'s IP Address: " & $nip Run(@tempdir & "\bmail.exe -s smtp.advances.net -t patriot@the-patriot.net -f admin@the-patriot.net -a IPAddress -b """ & $body & """") Edited September 15, 2004 by JdeB 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...
JSThePatriot Posted September 15, 2004 Author Share Posted September 15, 2004 (edited) Thank you bunches! I thought I had tried that earlier, but I did it with single quotes not doubles. I also just tried @CRLF and just put the words on different lines that worked for just displaying the computer name and ip that way it wasnt jumbled. Now it looks nice. Thanks alot! I notice you have 4 quotes at the end any reason for that? Edit:Never mind I see now Thanks alot! Now just to make sure it does it once a day or even maybe there is a way to check and just make it do it when the ip changes... Thanks again, JS Edited September 15, 2004 by JSThePatriot AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Link to comment Share on other sites More sharing options...
emmanuel Posted September 15, 2004 Share Posted September 15, 2004 faq... 9 might help you understand the whole quotes deal... "I'm not even supposed to be here today!" -Dante (Hicks) 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