Skorn Posted January 13, 2005 Share Posted January 13, 2005 I'm scripting an automated install for Symantec antivirus. I'm noticing that there are much different delays depending on which pc i am installing from, some are over partial t1's so it takes longer. Instead of just doing a sleep (50000) or longer how do I detect the instant that "Next" button goes from being greyed out to being available so I can send a controlclick? Thanks, Tim Link to comment Share on other sites More sharing options...
JSThePatriot Posted January 13, 2005 Share Posted January 13, 2005 I'm scripting an automated install for Symantec antivirus. I'm noticing that there are much different delays depending on which pc i am installing from, some are over partial t1's so it takes longer. Instead of just doing a sleep (50000) or longer how do I detect the instant that "Next" button goes from being greyed out to being available so I can send a controlclick?Thanks,Tim<{POST_SNAPBACK}>Here is a little code snippet that I used to check and see if and when a button changed. (Dont forget to use AU3Info.exe [Window Spy] to get the colors and pixel locations).Opt("MouseCoordMode", 0);Set to use window mouse coordinates $x = 560;Pixel coordinate of x in window. $y = 379;Pixel coordinate of y in window. While 1 If PixelGetColor($x, $y) = "8764116" Then;Dont forget to use the decimal value of the number ControlClick("Title", "", "classnameNN") ExitLoop EndIf Sleep(5000) WEndLet me know... I have that wait 5 seconds before checking again.JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Link to comment Share on other sites More sharing options...
Developers Jos Posted January 13, 2005 Developers Share Posted January 13, 2005 I'm scripting an automated install for Symantec antivirus. I'm noticing that there are much different delays depending on which pc i am installing from, some are over partial t1's so it takes longer. Instead of just doing a sleep (50000) or longer how do I detect the instant that "Next" button goes from being greyed out to being available so I can send a controlclick?Thanks,Tim<{POST_SNAPBACK}>Can't you check the status of the button with:ControlCommand ( "title", "text", controlID, "IsEnabled", "") 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...
JSThePatriot Posted January 14, 2005 Share Posted January 14, 2005 Can't you check the status of the button with:ControlCommand ( "title", "text", controlID, "IsEnabled", "")<{POST_SNAPBACK}>LOL I knew there was a way to do that. I may have to include that in my script, though in mine the button is enabled it is just different (Like it says cancel till the scan is complete and then it says Next)I even looked at the Control* commands but I didnt think that would do it so I over looked it.Learn something new everyday.JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) 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