Somebody Someware Posted August 26, 2006 Share Posted August 26, 2006 (edited) My problem: How do I make the script wait until a specified control is hidden? Please help me. I am going to smash my head against the wall if I can't get the answer! Edited August 26, 2006 by Somebody Someware Go to This site for my best product! Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted August 26, 2006 Share Posted August 26, 2006 control on the GUI or what , could you please specify what type of contorl you are talkign about Link to comment Share on other sites More sharing options...
Somebody Someware Posted August 26, 2006 Author Share Posted August 26, 2006 control on the GUI or what , could you please specify what type of contorl you are talkign about I want to automate the EasyCleaner registry cleaning process with has an progress bar as an control(TProgressBar or something like that). It doesn't have anything to do with an GUI. I mean something like: Do Sleep(500) Until NOT ControlActive = TProgrssBar I know that the above is just rubbish but it is the idea what i wan't. Go to This site for my best product! Link to comment Share on other sites More sharing options...
Zedna Posted August 26, 2006 Share Posted August 26, 2006 (edited) Use ControlCommand & "IsVisible" command, see helpfile for more info. Edited August 26, 2006 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Somebody Someware Posted August 27, 2006 Author Share Posted August 27, 2006 Use ControlCommand & "IsVisible" command, see helpfile for more info.I can't get it working, how do I get it working? Go to This site for my best product! Link to comment Share on other sites More sharing options...
Bert Posted August 27, 2006 Share Posted August 27, 2006 can we see your code, and the name of the program you are trying to work with? The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Zedna Posted August 27, 2006 Share Posted August 27, 2006 I can't get it working, how do I get it working?Look at HelpFile & search in this forum for examples of use. Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Somebody Someware Posted August 27, 2006 Author Share Posted August 27, 2006 can we see your code, and the name of the program you are trying to work with? Of course, this is the bit I am working on: expandcollapse popupIf GUICtrlRead($opt3) = 1 Then Opt("MouseCoordMode", 2) Run("C:\Program Files\Extreme Cleaner\EASYCLEANER\EasyClea.exe") Sleep("5000") TrayTip ( "Extreme Cleaner", "Kies a.u.b. de taal die u wilt gebruiken voor EasyCleaner, als u een andere taal als nederlands kiest heeft dit geen gevolgen voor Extreme Cleaner", 30 , 3 ) WinWaitActive("EasyCleaner 2.0 by ToniArts") TrayTip ( "Extreme Cleaner", "EasyCleaner is gestart", 30 , 1 ) Sleep("1000") MouseClick ( "left" , 16, 104 , 1 , 10 ) Sleep("5000") MouseClick ( "left" , 48, 394 , 1 , 10 ) #comments-start Here I want the program to wait until the control called TProgressBar1 is hidden. Do Sleep(500) $easycleanerprogressbar = ControlCommand( "Register schoonmaken", "", "TProgressBar1", "IsVisible", "") If Not $easycleanerprogressbar = True Then ExitLoop EndIf Until #comments-end MouseClick ( "left" , 128, 394 , 1 , 10 ) MouseClick ( "left" , 288, 394 , 1 , 10 ) Sleep("5000") MouseClick ( "left" , 115, 61 , 1 , 10 ) Sleep("1000") MouseClick ( "left" , 608, 394 , 1 , 10 ) TrayTip ( "Extreme Cleaner", "Het register is schoongemaakt", 30 , 1 ) Sleep("500") MouseClick ( "left" , 16, 254 , 1 , 10 ) TrayTip ( "Extreme Cleaner", "De Cookies worden verwijderd", 3, 1 ) Sleep("2000") MouseClick ( "left" , 44, 61 , 1 , 10 ) TrayTip ( "Extreme Cleaner", "De Cookies zijn verwijderd", 30 , 1 ) Sleep("1000") MouseClick ( "left" , 176, 254 , 1 , 10 ) TrayTip ( "Extreme Cleaner", "De MRU lijst wordt verwijderd", 30 , 1 ) Sleep("2000") MouseClick ( "left" , 46, 61 , 1 , 10 ) TrayTip ( "Extreme Cleaner", "De MRU lijst is verwijderd", 30 , 1 ) Sleep("1000") MouseClick ( "left" , 136, 404 , 1 , 10 ) TrayTip ( "Extreme Cleaner", "EasyCleaner is afgesloten", 30 , 1 ) EndIf The If and EndIf is because it is part of an big GUI Everything except the piece between #comments-start and #comments-end work. Please help me. Go to This site for my best product! Link to comment Share on other sites More sharing options...
Zedna Posted August 27, 2006 Share Posted August 27, 2006 Of course, this is the bit I am working on: #comments-start Here I want the program to wait until the control called TProgressBar1 is hidden. Do Sleep(500) $easycleanerprogressbar = ControlCommand( "Register schoonmaken", "", "TProgressBar1", "IsVisible", "") If Not $easycleanerprogressbar = True Then ExitLoop EndIf Until #comments-end The If and EndIf is because it is part of an big GUI Everything except the piece between #comments-start and #comments-end work. Please help me. Try this: Do Sleep(500) $easycleanerprogressbar = ControlCommand( "Register schoonmaken", "", "TProgressBar1", "IsVisible", "") If @error or $easycleanerprogressbar = 0 Then ExitLoop EndIf Until Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Somebody Someware Posted August 27, 2006 Author Share Posted August 27, 2006 (edited) Try this: Do Sleep(500) $easycleanerprogressbar = ControlCommand( "Register schoonmaken", "", "TProgressBar1", "IsVisible", "") If @error or $easycleanerprogressbar = 0 Then ExitLoop EndIf Until I tried it but it makes the script wait until earth wil explode! This is the error I get in the SciTi (or something like that) editor: >"C:\Program Files\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Extreme Cleaner\GUI.au3" C:\Extreme Cleaner\GUI.au3 (237) : ==> Error in expression.: Until Until^ ERROR >Exit code: 0 Time: 18.276 I know what's wrong! You did forget to enter the until tag! Edited August 27, 2006 by Somebody Someware Go to This site for my best product! Link to comment Share on other sites More sharing options...
Somebody Someware Posted August 27, 2006 Author Share Posted August 27, 2006 I tried it but it makes the script wait until earth wil explode! This is the error I get in the SciTi (or something like that) editor: I know what's wrong! You did forget to enter the until tag! I have added FileExists("C:\Program Files\This file may not exists\This file may not exists.exe") after until. Go to This site for my best product! Link to comment Share on other sites More sharing options...
Azu Posted August 27, 2006 Share Posted August 27, 2006 I have added FileExists("C:\Program Files\This file may not exists\This file may not exists.exe") after until.Try replacing do with while and until with wend. And don't put FileExists("C:\Program Files\This file may not exists\This file may not exists.exe") after the wend, that will probably error up your script. Link to comment Share on other sites More sharing options...
Zedna Posted August 30, 2006 Share Posted August 30, 2006 I tried it but it makes the script wait until earth wil explode!This is the error I get in the SciTi (or something like that) editor:I know what's wrong! You did forget to enter the until tag! This was YOUR BUG not my. I only copied your script and changed some part. I didn't control your whole syntax! Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Somebody Someware Posted August 30, 2006 Author Share Posted August 30, 2006 This was YOUR BUG not my. I only copied your script and changed some part. I didn't control your whole syntax!I am sorry for my reaction , I didn't mean you are a bad scripter or something.I will never react like that again. Go to This site for my best product! 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