jay Posted October 18, 2005 Share Posted October 18, 2005 (edited) Can someone help me with the syntax on the line below or show me where i can learn it. Run("blat.exe", "-serverSMTP", $SMTPADD, "-s" $SUBJECT, "-body" $BODY, "-u" $USERNAME, "-pw" $PASSWORD, "-t" $TO ) Edited October 18, 2005 by jay Link to comment Share on other sites More sharing options...
jay Posted October 18, 2005 Author Share Posted October 18, 2005 (edited) Can someone help me with the syntax on the line below or show me where i can learn it. Run("blat.exe", "-serverSMTP", $SMTPADD, "-s" $SUBJECT, "-body" $BODY, "-u" $USERNAME, "-pw" $PASSWORD, "-t" $TO )Maybe i am getting closer to solveing thisRun("blat.exe", "", "-serverSMTP" & $SMTPADD & "-s" & $SUBJECT & "-body" & $BODY & "-u" & $USERNAME & "-pw" & $PASSWORD & "-t" & $TO )I just wish i could see what it is passing to the cmd line Edited October 18, 2005 by jay Link to comment Share on other sites More sharing options...
Valuater Posted October 18, 2005 Share Posted October 18, 2005 (edited) like this MsgBox(0,"Test", "-serverSMTP" & $SMTPADD & "-s" & $SUBJECT & "-body" & $BODY & "-u" & $USERNAME & "-pw" & $PASSWORD & "-t" & $TO) EDIT: fixed 8) Edited October 18, 2005 by Valuater Link to comment Share on other sites More sharing options...
Valuater Posted October 18, 2005 Share Posted October 18, 2005 You might want to take a look at this post alsoregading passing "^&" to dos cmd linehttp://www.autoitscript.com/forum/index.ph...st=0&p=1154088) Link to comment Share on other sites More sharing options...
jay Posted October 18, 2005 Author Share Posted October 18, 2005 (edited) like thisMsgBox(0,"Test", "-serverSMTP" & $SMTPADD & "-s" & $SUBJECT & "-body" & $BODY & "-u" & $USERNAME & "-pw" & $PASSWORD & "-t" & $TO) EDIT: fixed8)Its getting numbers instead of the strings; example 1#include <GUIConstants.au3>GUICreate("Email GUI App") ; will create a dialog box that when displayed is centered;INIREAD --------------------------------------------------- $Ini = "guiemail.ini" $SMTP = IniRead($Ini, "section1", "SMTP", "Not Found") $Ini = "guiemail.ini" $UNAME = IniRead($Ini, "section1", "USERNAME", "Not Found") $Ini = "guiemail.ini" $pword = IniRead($Ini, "section1", "PASSWORD", "Not Found") $Ini = "guiemail.ini" $TOWHO = IniRead($Ini, "section1", "TO", "Not Found") $Ini = "guiemail.ini" $FROMWHO = IniRead($Ini, "section1", "FROM", "Not Found") $Ini = "guiemail.ini" $SUBWHO = IniRead($Ini, "section1", "SUBJECT", "Not Found") $Ini = "guiemail.ini" $BODYWHO = IniRead($Ini, "section1", "BODY", "Not Found");INIREAD --------------------------------------------------- GUICtrlCreateLabel ("SMTP ADDRESS:", 2, 12, 100, 100, -1, -1) $SMTPADD = GUICtrlCreateInput($SMTP, 100, 10, 150, 20) GUICtrlCreateLabel ("USERNAME:", 2, 38, 100, 100, -1, -1) ;+26 $USERNAME = GUICtrlCreateInput ($UNAME, 100, 35, 150, 20) ;+25 GUICtrlCreateLabel ("PASSWORD:", 2, 64, 100, 100, -1, -1) $PASSWORD = GUICtrlCreateInput ($pword, 100, 60, 150, 20) GUICtrlCreateLabel ("TO:", 2, 90, 100, 100, -1, -1) $TO = GUICtrlCreateInput ($TOWHO, 100, 85, 150, 20) GUICtrlCreateLabel ("FROM:", 2, 116, 100, 100, -1, -1) $FROM = GUICtrlCreateInput ($FROMWHO, 100, 110, 150, 20) GUICtrlCreateLabel ("SUBJECT:", 2, 142, 100, 100, -1, -1) $SUBJECT = GUICtrlCreateInput ($SUBWHO, 100, 135, 150, 20) GUICtrlCreateLabel ("BODY:", 2, 168, 100, 100, -1, -1) $BODY = GUICtrlCreateInput ($BODYWHO, 100, 160, 150, 150, $ES_MULTILINE) $SEND = GUICtrlCreateButton ("SEND", 203, 325, 50, 20) $SAVE = GUICtrlCreateButton ("SAVE", 152, 325, 50, 20) $CLOSE = GUICtrlCreateButton ("CLOSE", 100, 325, 50, 20)GUISetState (@SW_SHOW) ; will display an empty dialog box; Run the GUI until the dialog is closedWhile 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop If $msg = $CLOSE Then ExitLoop If $msg = $SEND Then Run("blat.exe", "", "-serverSMTP" & $SMTPADD & "-s" & $SUBJECT & "-body" & $BODY & "-u" & $USERNAME & "-pw" & $PASSWORD & "-t" & $TO ) MsgBox(0,"Test", "-serverSMTP" & $SMTPADD & "-s" & $SUBJECT & "-body" & $BODY & "-u" & $USERNAME & "-pw" & $PASSWORD & "-t" & $TO) ;this returns -serverSMTP4-s14-body-16-u6-pw8-t10 ;When it should be blat.exe -serverSMTP somewhere.org -s Falcon -body Falcon Problem -u username -pw password -t someone@somewhere.com EndIf If $msg = $SAVE Then ;INIWRITE --------------------------------------------------- IniWrite($Ini, "section1", "SMTP", GUICtrlRead($SMTPADD )) IniWrite($Ini, "section1", "USERNAME", GUICtrlRead($USERNAME)) IniWrite($Ini, "section1", "PASSWORD", GUICtrlRead($PASSWORD)) IniWrite($Ini, "section1", "TO", GUICtrlRead($TO)) IniWrite($Ini, "section1", "FROM", GUICtrlRead($FROM)) IniWrite($Ini, "section1", "SUBJECT", GUICtrlRead($SUBJECT)) IniWrite($Ini, "section1", "BODY", GUICtrlRead($BODY)) ;INIWRITE --------------------------------------------------- EndIfWend Edited October 18, 2005 by jay Link to comment Share on other sites More sharing options...
Valuater Posted October 18, 2005 Share Posted October 18, 2005 (edited) First you need to "READ" each input like this $Message = "-serverSMTP" & (GUICtrlRead($SMTPADD)) & .... Run("blat.exe", "", $Message ) 8) 8) Edited October 18, 2005 by Valuater Link to comment Share on other sites More sharing options...
DiskAI Posted October 18, 2005 Share Posted October 18, 2005 Run("blat.exe -serverSMTP """ & $SMTPADD & """ -s """ & $SUBJECT & """ -body """ & $BODY & """ -u """ & $USERNAME & """ -pw """ & $PASSWORD & """ -t """ & $TO & """")extra space and quotes required to get the format used in blat.exei think i think Link to comment Share on other sites More sharing options...
jay Posted October 18, 2005 Author Share Posted October 18, 2005 First you need to "READ" each inputlike this$Message = "-serverSMTP" & (GUICtrlRead($SMTPADD)) & ....Run("blat.exe", "", $Message )8)8)Do i need to read the input in the send section of the script?And thanks fr your helpJay Link to comment Share on other sites More sharing options...
jay Posted October 18, 2005 Author Share Posted October 18, 2005 (edited) extra space and quotes required to get the format used in blat.exei think well this started blat but i still cant dont see what is be passed to the var for itJay Edited October 18, 2005 by jay Link to comment Share on other sites More sharing options...
Valuater Posted October 18, 2005 Share Posted October 18, 2005 If $msg = $SEND Then $Message = "-serverSMTP" & (GUICtrlRead($SMTPADD)) & ....... Run("blat.exe", "",$Message) MsgBox(0,"Test", $Message) EndIf 8) Link to comment Share on other sites More sharing options...
DiskAI Posted October 18, 2005 Share Posted October 18, 2005 well this started blat but i still cant dont see what is be passed to the var for itJayadding GUICtrlRead before each variables might help i think i think Link to comment Share on other sites More sharing options...
Valuater Posted October 18, 2005 Share Posted October 18, 2005 You can modify this also ;INIREAD --------------------------------------------------- Dim $Ini = "guiemail.ini" $SMTP = IniRead($Ini, "section1", "SMTP", "Not Found") $UNAME = IniRead($Ini, "section1", "USERNAME", "Not Found") $pword = IniRead($Ini, "section1", "PASSWORD", "Not Found") $TOWHO = IniRead($Ini, "section1", "TO", "Not Found") $FROMWHO = IniRead($Ini, "section1", "FROM", "Not Found") $SUBWHO = IniRead($Ini, "section1", "SUBJECT", "Not Found") $BODYWHO = IniRead($Ini, "section1", "BODY", "Not Found") ;INIREAD --------------------------------------------------- you only need to say $Ini = ..... one time 8) Link to comment Share on other sites More sharing options...
jay Posted October 18, 2005 Author Share Posted October 18, 2005 You can modify this also;INIREAD --------------------------------------------------- Dim $Ini = "guiemail.ini" $SMTP = IniRead($Ini, "section1", "SMTP", "Not Found") $UNAME = IniRead($Ini, "section1", "USERNAME", "Not Found") $pword = IniRead($Ini, "section1", "PASSWORD", "Not Found") $TOWHO = IniRead($Ini, "section1", "TO", "Not Found") $FROMWHO = IniRead($Ini, "section1", "FROM", "Not Found") $SUBWHO = IniRead($Ini, "section1", "SUBJECT", "Not Found") $BODYWHO = IniRead($Ini, "section1", "BODY", "Not Found") ;INIREAD ---------------------------------------------------you only need to say $Ini = .....one time8)Can you give an example?Thanks Link to comment Share on other sites More sharing options...
jay Posted October 18, 2005 Author Share Posted October 18, 2005 (edited) Do i need to read the input in the send section of the script?And thanks fr your helpJay$Message = "-serverSMTP" & (GUICtrlRead($SMTPADD)) & "-s" & (GUICtrlRead($SUBJECT)) & "-body" & (GUICtrlRead($BODY)) & "-u" & (GUICtrlRead($USERNAME)) & "-pw" & (GUICtrlRead($PASSWORD)) & "-t" & (GUICtrlRead($TO)) )MsgBox(0,"Test11", $Message)Run("blat.exe", "",$Message)This i what i got from your post but i think i got it wrong Edited October 18, 2005 by jay Link to comment Share on other sites More sharing options...
Valuater Posted October 18, 2005 Share Posted October 18, 2005 try the "Double quotes" like DiskAI stated above... and with the message box you should be able to see your spacing... and the ini write above is the example 8) Link to comment Share on other sites More sharing options...
jay Posted October 18, 2005 Author Share Posted October 18, 2005 try the "Double quotes" like DiskAI stated above... and with the message box you should be able to see your spacing...and the ini write above is the example8)I think my problem now it the thisRun("blat.exe", "", $Message)It does not seem to be attemping to Run Blat.exe and its in the directory.. Link to comment Share on other sites More sharing options...
Valuater Posted October 18, 2005 Share Posted October 18, 2005 help states this Run ( "filename" [, "workingdir" [, flag[, standard_i/o_flag]]] ) Parameters filename The name of the executable (EXE, BAT, COM, or PIF) to run. workingdir [optional] The working directory. flag [optional] The "show" flag of the executed program: @SW_HIDE = Hidden window @SW_MINIMIZE = Minimized window @SW_MAXIMIZE = Maximized window standard_i/o_flag [optional] Provide a meaningful handle to one or more STD I/O streams of the child process. 1 ($STDIN_CHILD) = Provide a handle to the child's STDIN stream 2 ($STDOUT_CHILD) = Provide a handle to the child's STDOUT stream 4 ($STDERR_CHILD) = Provide a handle to the child's STDERR stream so... maybe you need to do this Run(@ScriptDir & "\blat.exe " & $Message) i have never used blat 8) Link to comment Share on other sites More sharing options...
herewasplato Posted October 18, 2005 Share Posted October 18, 2005 (edited) Edit: Valuater beat me to it.... I think that the syntax for Run has been in error for each of the posts to this thread thus far. Run("blat.exe", "", $Message) Run("filename", "workingdir", flag) Try Run("blat.exe " & $Message, "workingdir", flag) or just Run("blat.exe " & $Message) Or maybe I don't understand what you are attempting.... Edited October 18, 2005 by herewasplato [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
jay Posted October 18, 2005 Author Share Posted October 18, 2005 help states thisRun ( "filename" [, "workingdir" [, flag[, standard_i/o_flag]]] )Parametersfilename The name of the executable (EXE, BAT, COM, or PIF) to run. workingdir [optional] The working directory. flag [optional] The "show" flag of the executed program: @SW_HIDE = Hidden window @SW_MINIMIZE = Minimized window @SW_MAXIMIZE = Maximized window standard_i/o_flag [optional] Provide a meaningful handle to one or more STD I/O streams of the child process. 1 ($STDIN_CHILD) = Provide a handle to the child's STDIN stream 2 ($STDOUT_CHILD) = Provide a handle to the child's STDOUT stream 4 ($STDERR_CHILD) = Provide a handle to the child's STDERR stream so... maybe you need to do thisRun(@ScriptDir & "\blat.exe " & $Message)i have never used blat8)Ok i am getting closer how can i get it to keep the Quotes around the Text Example "SMTP.SERVER" its coming out like this instead SMTP.SERVER i need the quotes to stay... Link to comment Share on other sites More sharing options...
jay Posted October 18, 2005 Author Share Posted October 18, 2005 Ok i am getting closer how can i get it to keep the Quotes around the Text Example "SMTP.SERVER" its coming out like this instead SMTP.SERVER i need the quotes to stay...Maybe its working now I just got a email 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