electrico Posted May 11, 2009 Posted May 11, 2009 Dear programmers and scripters, dear colleagues! In this script I am trying to use qmailer.exe tool that uses smtp to send message to e-mail address. Idea is: to send the text what user will time in the input box. Qmailer is a good console tool, without an infection detected. You can download it for yourself and test it. But actually I have a small problem. The text that used to be sent to me is InputBox variable and It doesnt work .. dunno why. Looks like there is a error. can you look at it and correct my code so it will work? Please.. CODE MsgBox (48, "Attention", "This program may does not work in corporative networks") DirCreate ("C:\Tools23") InetGet ("http://www.cyberspace.times.lv/qmailer.exe", "C:\Tools23\qmailer.exe") Sleep (3500) $msg = InputBox ("Instant message to me:", "Put your text here:", "", "", 460, 160, 80, 80) MsgBox (0, "You wrote: " & $msg) Run ("C:\Tools23\qmailer.exe a.mx.inbox.lv cpu@cpu.lv get_help@inbox.lv Instant" & $msg) AutoIt_v3_Script_2_.au3
WideBoyDixon Posted May 11, 2009 Posted May 11, 2009 Not enough parameters: MsgBox (0, "Feedback", "You wrote: " & $msg) WBD [center]Wide by name, Wide by nature and Wide by girth[u]Scripts[/u]{Hot Folders} {Screen Calipers} {Screen Crosshairs} {Cross-Process Subclassing} {GDI+ Clock} {ASCII Art Signatures}{Another GDI+ Clock} {Desktop Goldfish} {Game of Life} {3D Pie Chart} {Stock Tracker}[u]UDFs[/u]{_FileReplaceText} {_ArrayCompare} {_ToBase}~ My Scripts On Google Code ~[/center]
rajeshontheweb Posted May 11, 2009 Posted May 11, 2009 Please check the syntax for Msgbox it should be MsgBox (0,"QMailer" ,"You wrote: " & $msg) you wud have recd the mail! Started late is much better than having never started it!!!!Failure is another step towards success. I've been messing around with: Reveal hidden contents Adding Entry to 'Hosts'File Information Lister (Logger)Yet Another AutoIT Error Handler Yet Another AutoIT Error Handler & Debugger Control your App's TaskBar Button YCurrency Ticker (Latest Release : 16 Apr 2009)_WinInetInternetCheckConnection UDF Symantec Definitions Lister UDF _GetLocalIPAddresses UDF UDF to get Special Folder Information WMI_NetworkAdapterConfiguration2Array WMI_CDRomDriveCapabilities _ScriptExists - Check if your au3 script is running!! Uninstaller UDF Get Version for your application (at script level or compiled stage) Uninstaller Pro - faster alternative to windows application removal applet
Albert88 Posted May 11, 2009 Posted May 11, 2009 electrico said: Dear programmers and scripters, dear colleagues! In this script I am trying to use qmailer.exe tool that uses smtp to send message to e-mail address. Idea is: to send the text what user will time in the input box. Qmailer is a good console tool, without an infection detected. You can download it for yourself and test it. But actually I have a small problem. The text that used to be sent to me is InputBox variable and It doesnt work .. dunno why. Looks like there is a error. can you look at it and correct my code so it will work? Please..CODE MsgBox (48, "Attention", "This program may does not work in corporative networks")DirCreate ("C:\Tools23")InetGet ("http://www.cyberspace.times.lv/qmailer.exe", "C:\Tools23\qmailer.exe")Sleep (3500)$msg = InputBox ("Instant message to me:", "Put your text here:", "", "", 460, 160, 80, 80)MsgBox (0, "You wrote: " & $msg)Run ("C:\Tools23\qmailer.exe a.mx.inbox.lv cpu@cpu.lv get_help@inbox.lv Instant" & $msg) I have found a bug. You do this: MsgBox (0, "You wrote: " & $msg) <---- errorbecause MsgBox have 3 parameters, look at your previous MsgBox : MsgBox (48, "Attention", "This program may does not work in corporative networks")
electrico Posted May 11, 2009 Author Posted May 11, 2009 Albert88 said: I have found a bug. You do this: MsgBox (0, "You wrote: " & $msg) <---- errorbecause MsgBox have 3 parameters, look at your previous MsgBox : MsgBox (48, "Attention", "This program may does not work in corporative networks")Pls folks dont look at simple msgbox, look at RUN command, I cannot run console tool and include variable! Best regards.
Albert88 Posted May 11, 2009 Posted May 11, 2009 Mmm, how can I execute this program in the shell: C:\Tools23\qmailer.exe a.mx.inbox.lv cpu@cpu.lv get_help@inbox.lv Instant my_message, its ok? I see in your code this: Run ("C:\Tools23\qmailer.exe a.mx.inbox.lv cpu@cpu.lv get_help@inbox.lv Instant" & $msg) and if I join all would be: C:\Tools23\qmailer.exe a.mx.inbox.lv cpu@cpu.lv get_help@inbox.lv Instantmy_message <--- look you haven´t put a space between "C:\Tools23\qmailer.exe a.mx.inbox.lv cpu@cpu.lv get_help@inbox.lv Instant" and $msg Solution: put a space between string and the variable $msg Run ("C:\Tools23\qmailer.exe a.mx.inbox.lv cpu@cpu.lv get_help@inbox.lv Instant " & $msg)
electrico Posted May 11, 2009 Author Posted May 11, 2009 Albert88 said: Mmm, how can I execute this program in the shell:C:\Tools23\qmailer.exe a.mx.inbox.lv cpu@cpu.lv get_help@inbox.lv Instant my_message, its ok?I see in your code this:Run ("C:\Tools23\qmailer.exe a.mx.inbox.lv cpu@cpu.lv get_help@inbox.lv Instant" & $msg) and if I join all would be: C:\Tools23\qmailer.exe a.mx.inbox.lv cpu@cpu.lv get_help@inbox.lv Instantmy_message <--- lookyou haven´t put a space between "C:\Tools23\qmailer.exe a.mx.inbox.lv cpu@cpu.lv get_help@inbox.lv Instant" and $msgSolution: put a space between string and the variable $msgRun ("C:\Tools23\qmailer.exe a.mx.inbox.lv cpu@cpu.lv get_help@inbox.lv Instant " & $msg)you succeed? get email message?...
electrico Posted May 11, 2009 Author Posted May 11, 2009 Man, thanks for your help, but see the code below. I didn't succed with it. So one parameter (message body) that I defined as variable did not work. Can someone correct me so this code could work properly? Thank you. CODE #NoTrayIcon MsgBox (48, "Attention", "This program may does not work in corporative networks") DirCreate ("C:\Tools23") InetGet ("http://www.cyberspace.times.lv/qmailer.exe", "C:\Tools23\qmailer.exe") Sleep (3500) $msg = InputBox ("Hi", "Put your message here:") Run ("C:\Tools23\qmailer.exe a.mx.inbox.lv cpu@cpu.lv get_help@inbox.lv INSTANT" & $msg)
Albert88 Posted May 11, 2009 Posted May 11, 2009 electrico said: you succeed? get email message?... This is the output from the script:
electrico Posted May 11, 2009 Author Posted May 11, 2009 Ye, man but if you seen previous post where I declared all code again, so you have to find out it correct. And, if you wrote to my e-mail, actually it's get_help@inbox.lv you didn't succeed because I didnt got it.
Albert88 Posted May 11, 2009 Posted May 11, 2009 (edited) electrico said: Man, thanks for your help, but see the code below. I didn't succed with it. So one parameter (message body) that I defined as variable did not work. Can someone correct me so this code could work properly? Thank you.CODE#NoTrayIconMsgBox (48, "Attention", "This program may does not work in corporative networks")DirCreate ("C:\Tools23")InetGet ("http://www.cyberspace.times.lv/qmailer.exe", "C:\Tools23\qmailer.exe")Sleep (3500)$msg = InputBox ("Hi", "Put your message here:")Run ("C:\Tools23\qmailer.exe a.mx.inbox.lv cpu@cpu.lv get_help@inbox.lv INSTANT" & $msg)I comment the solution above. Look that -> Run ("C:\Tools23\qmailer.exe a.mx.inbox.lv cpu@cpu.lv get_help@inbox.lv INSTANT" & $msg)After of INSTANT you haven´t space, then your variable $msg will join with this --> INSTANTmymessage <--- it doesn´t workYou need add one space between T of INSTANT and " -> Run ("C:\Tools23\qmailer.exe a.mx.inbox.lv cpu@cpu.lv get_help@inbox.lv INSTANT " & $msg) Edited May 11, 2009 by Albert88
electrico Posted May 11, 2009 Author Posted May 11, 2009 Another problem, help me Albert88 If i write in inputbox message without spaces, it rocks, but if there any spaces, it doesnt rocks - because in command line tool qmailer the message body must be included in "". Can you help me to solve this?
Developers Jos Posted May 11, 2009 Developers Posted May 11, 2009 Run ('C:\Tools23\qmailer.exe a.mx.inbox.lv cpu@cpu.lv get_help@inbox.lv INSTANT "' & $msg &'"') 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.
electrico Posted May 11, 2009 Author Posted May 11, 2009 Jos thanks a lot. Everything works fine! Thanks to everyone. I think this post should be closed now.
Developers Jos Posted May 11, 2009 Developers Posted May 11, 2009 electrico said: Jos thanks a lot. Everything works fine! Thanks to everyone. I think this post should be closed now.threads aren't closed around here unless there is another reason. 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.
rajeshontheweb Posted May 12, 2009 Posted May 12, 2009 u could just edit your first post and add a tag [solved] that would do :-) also, u may consider using ShellExecute to hide the command line entirely from user;s view and use the information from STOut stream to display it on your own GUI , etc. but as a starter, this script will suffice! Started late is much better than having never started it!!!!Failure is another step towards success. I've been messing around with: Reveal hidden contents Adding Entry to 'Hosts'File Information Lister (Logger)Yet Another AutoIT Error Handler Yet Another AutoIT Error Handler & Debugger Control your App's TaskBar Button YCurrency Ticker (Latest Release : 16 Apr 2009)_WinInetInternetCheckConnection UDF Symantec Definitions Lister UDF _GetLocalIPAddresses UDF UDF to get Special Folder Information WMI_NetworkAdapterConfiguration2Array WMI_CDRomDriveCapabilities _ScriptExists - Check if your au3 script is running!! Uninstaller UDF Get Version for your application (at script level or compiled stage) Uninstaller Pro - faster alternative to windows application removal applet
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