slugger415 Posted February 20, 2009 Share Posted February 20, 2009 (edited) Hi all, uber-newbie here. I have a simple au3 file I'm using to login to Perforce, where I want it to wait for the pass: prompt before entering the password. I'm probably doing this wrong (couldn't find anything in the documentation about waiting for strings), but it looks something like this: Run("p4 -p server -u client-name login") Send("tXpassword{ENTER}") The strange thing is when this is run from the command line, the first two characters of the password "tX" appear on the command line after the script is run, and sometimes the login doesn't work. At one point the script was actually working though.... How can I tell the script to wait for a string such as "pass:"? And what's going on with the tX appearing? thanks Scott Edited February 20, 2009 by slugger415 Link to comment Share on other sites More sharing options...
judgedk Posted February 20, 2009 Share Posted February 20, 2009 maybe the WinWaitActive could be of use to you Link to comment Share on other sites More sharing options...
enaiman Posted February 22, 2009 Share Posted February 22, 2009 Give it some time before sending the password; if you don't it will try to send it a.s.a.p. A Sleep(1000) before sending the password should be enough; you can experiment also with different sleep times (I don't think that a couple seconds more can hurt). SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script wannabe "Unbeatable" Tic-Tac-Toe Paper-Scissor-Rock ... try to beat it anyway :) Link to comment Share on other sites More sharing options...
rabbitkillrun Posted February 22, 2009 Share Posted February 22, 2009 (edited) As the other two said, you could either use WinActive() to check if the window you want is active, which will be the more reliable choice of the two, or you can add one simple Sleep() line... Edited February 23, 2009 by rabbitkillrun 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