Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
The script is as follows:
SendKey("!u") ;MOVE TO USERNAME FIELD TimeDelay(3) SendKey(username) ;ENTERS %USERNAME% TimeDelay(3) SendKey("!p") ;MOVES TO PASSWORD FIELD TimeDelay(3) SendKey(password_1);ENTERS %PWD% SPECIFIED ABOVE TimeDelay(3) SendKey("{ENTER}") ;SELECT OK BUTTONWhat happens is in the currently selected field a 'u' is entered, there is a 3 second delay, then the username is entered, 3 second delay, 'p' is entered, 3 second delay, password is entered, 3 second delay and then "ENTER".
According to the WIL reference manual, the syntax is correct. Any idea on how to fix this?
I also recommend adding code to make sure you are sending the keys to the correct window title. What is the title of this window? Change SendKey to SendKeysTo. You might also want to add a WinWaitExist to help with keystroke timing.
windowtitle = "Please Enter User and Password" if !WinWaitExist(windowtitle,10) Message("Error: Window Not Found",windowtitle ) endif SendKeysto(windowtitle,"!u") ;MOVE TO USERNAME FIELD SendKeysto(windowtitle, username) ;ENTERS %USERNAME% SendKeysTo(windowtitle, "!p") ;MOVES TO PASSWORD FIELD SendKeysTo(windowtitle, password_1);ENTERS %PWD% SPECIFIED ABOVE SendKeysTo(windowtitle, "{ENTER}") ;SELECT OK BUTTONOr Maybe do a small TimeDelay before the SendKey("!u")
Sendkey("{ALT}u")watch those curly braces.
If none of these recommendations help: I recommend you completely ditch the current script, and figure out "RoboScripter". With only a little luck it will write all the code you need to do this operation almost instantly.
Article ID: W16715
File Created: 2005:02:18:12:21:58
Last Updated: 2005:02:18:12:21:58