Art1234 Posted October 22, 2009 Share Posted October 22, 2009 [ticket][/ticket]I am trying to use the SEND command to send a string of characters including the # symbol to a dialog box. I have read through the FAQ and found the “flag” parameter. But I am not having any luck implementing it. Would someone be kind enough to point me to an example? Here is what I have: ;getting parameters from command line $DestDir = $CmdLine[1] $Pword = $CmdLine[2] WinWaitActive ("PGP Self Decrypting Archive - Enter Passphrase") Send ("{TAB}") Send ("{TAB}") Send ("{TAB}") Send ("{TAB}") Send ($DestDir) Send ("{TAB}") Send ("{TAB}") Send ($Pword) Send ("{TAB}") Send ("{ENTER}") Link to comment Share on other sites More sharing options...
lordicast Posted October 22, 2009 Share Posted October 22, 2009 Okay what you are saying is that $Pword has a # in it and it doesnt want to send it? Give me a example of the dir and password. BTW you can shorten your sends likes this. $DestDir = $CmdLine[1] $Pword = $CmdLine[2] WinWaitActive ("PGP Self Decrypting Archive - Enter Passphrase") Send ("{TAB 4}") Send ($DestDir) Send ("{TAB 2}") Send ($Pword) Send ("{TAB}") Send ("{ENTER}") [Cheeky]Comment[/Cheeky] Link to comment Share on other sites More sharing options...
Art1234 Posted October 22, 2009 Author Share Posted October 22, 2009 Here is an example of the command line: PGP_AutoIt.exe c:\temp\test1 Wilm123# dir = c:\temp\test1 password = Wilm123# (I also suspect I'll run into passwords with other characters as well, !, @, etc.) Thanks for the consolodation tip! Link to comment Share on other sites More sharing options...
john7a8 Posted October 22, 2009 Share Posted October 22, 2009 Here is an example of the command line: PGP_AutoIt.exe c:\temp\test1 Wilm123# dir = c:\temp\test1 password = Wilm123# (I also suspect I'll run into passwords with other characters as well, !, @, etc.) Thanks for the consolodation tip! ART1234 Try this: $DestDir = $CmdLine[1] $Pword = $CmdLine[2] WinWaitActive ("PGP Self Decrypting Archive - Enter Passphrase") Send ("{TAB 4}") Send ($DestDir) Send ("{TAB 2}") Send ($Pword, 1) Send ("{TAB}") Send ("{ENTER}") Send ( "keys" [, flag] ) flag [optional] Changes how "keys" is processed: flag = 0 (default), Text contains special characters like + and ! to indicate SHIFT and ALT key-presses. flag = 1, keys are sent raw. Link to comment Share on other sites More sharing options...
lordicast Posted October 22, 2009 Share Posted October 22, 2009 What are you sending to? Try Commands in help file, ControlSend, ControlSetText Also like john said try sending it raw $DestDir = $CmdLine[1] $Pword = $CmdLine[2] WinWaitActive ("PGP Self Decrypting Archive - Enter Passphrase") Send ("{TAB 4}") Send ($DestDir,1) Send ("{TAB 2}") Send ($Pword,1) Send ("{TAB}") Send ("{ENTER}") [Cheeky]Comment[/Cheeky] Link to comment Share on other sites More sharing options...
Art1234 Posted October 22, 2009 Author Share Posted October 22, 2009 Thank you. I was taking the help file command line to literally. Trying things like "Send ( "keys" [, flag=1] )", etc. 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