mpotratz Posted January 16, 2011 Share Posted January 16, 2011 (edited) I have a script which automates the changing a TrueCrypt password. The encrypted volume has a default password. I prompt the user (VB application) for a new password. I pass this to an AutoIT .EXE file which then runs the TrueCrypt change password routine.The problem: If the user includes a "#" sign character in their password, that character does not get pasted into the text field on the screen. Code:$newPassword = $CmdLine[2]MsgBox(0, "password", $newPassword)ControlSend("Change Password or Keyfiles", "Confirm Password", "[CLASS:Edit; INSTANCE:2]", $newPassword) ;So, if I pass new#word to the AutoIT .EXE file, the message box above will show new#word. But, only newword gets pasted into the text field.If I open the change password dialog box, I can manually copy & paste new#word from another document into the box and it's pasted correctly. You can also manually type in any special character you want and it works correctly. Because of this, I'm assuming that TrueCrypt is not the problem by not limiting characters in that field.Any suggestions as how to get the "#" character to stick? For giggles I tried the "%" sign and it worked properly. Trapping special characters is out of the question because the overall program is multilingual and attempting to trap 37 different languages would be a nightmare at the least, impossible at the most. Edited January 16, 2011 by mpotratz Link to comment Share on other sites More sharing options...
somdcomputerguy Posted January 16, 2011 Share Posted January 16, 2011 See the Remarks for the Send() function. You may have to enclose some characters in braces ({ }). - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
Developers Jos Posted January 16, 2011 Developers Share Posted January 16, 2011 Just send the characters in RAW mode. See help file for the optional flag. 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...
mpotratz Posted January 16, 2011 Author Share Posted January 16, 2011 I changedControlSend("Change Password or Keyfiles", "Confirm Password", "[CLASS:Edit; INSTANCE:2]", $newPassword)to ControlSend("Change Password or Keyfiles", "Confirm Password", "[CLASS:Edit; INSTANCE:2]", $newPassword, 1)and that did it! Thanks for the tips, guys! 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