narayanjr Posted June 29, 2007 Share Posted June 29, 2007 WinWait("Security Information","",5) If WinExists("Security Information") Then Send("{ALTDOWN}y{ALTUP}") EndIf I need it to wait for the window "Security Information" which asks if you want to display secure and non secure information on the web page. Then if it finds it send Alt + Y to say yes, or if its not found within 5 seconds just continue on. When I use this as a separate program and I go to the site it works but when I have AuotIt go to the site it just waits the 5 seconds and continues the script. *Note* "https://ssl.rapidshare.com/cgi-bin/collectorszone.cgi" that page itself does not get the "security Information" window its once you log in that it opens up. Any ideas? #include <IE.au3> $oIE = _IECreate("https://ssl.rapidshare.com/cgi-bin/collectorszone.cgi") WinWait("Security Information","",5) If WinExists("Security Information") Then Send("{ALTDOWN}y{ALTUP}") EndIf $oForm = _IEFormGetCollection ($oIE, 0) $oQuery = _IEFormElementGetCollection ($oForm, 0) $oQuery2 = _IEFormElementGetCollection ($oForm, 1) Link to comment Share on other sites More sharing options...
PsaltyDS Posted June 29, 2007 Share Posted June 29, 2007 (edited) WinWait("Security Information","",5) If WinExists("Security Information") Then Send("{ALTDOWN}y{ALTUP}") EndIf I need it to wait for the window "Security Information" which asks if you want to display secure and non secure information on the web page. Then if it finds it send Alt + Y to say yes, or if its not found within 5 seconds just continue on. When I use this as a separate program and I go to the site it works but when I have AuotIt go to the site it just waits the 5 seconds and continues the script. *Note* "https://ssl.rapidshare.com/cgi-bin/collectorszone.cgi" that page itself does not get the "security Information" window its once you log in that it opens up. Any ideas? Just put in an adlib to watch for it: AdlibEnable("_SecInfoCheck", 250) ; Rest of the script Func _SecInfoCheck() If WinExists("Security Information") Then Do WinActivate("Security Information") Until WinActive("Security Information") Send("!y") EndIf EndFunc ;==>_SecInfoCheck Edit: Tweaked per MHz. Edited June 29, 2007 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
narayanjr Posted June 29, 2007 Author Share Posted June 29, 2007 Thank You, that worked perfectly. I've never seen that before I am going to look into it more Thanks. Link to comment Share on other sites More sharing options...
MHz Posted June 29, 2007 Share Posted June 29, 2007 Also, I highly recommend using WinWaitActive() before using Send(). Send requires the window to be active so do not assume that the window is active (even after using WinActivate) else something bad may happen instead. 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