Jump to content

ControlSend Action Problem


 Share

Recommended Posts

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 by mpotratz
Link to comment
Share on other sites

I changed

ControlSend("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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...