Jump to content

Recommended Posts

Posted

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!

Posted

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:

If 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!

Posted

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
Posted (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! :P Edited by Somebody Someware

Go to This site for my best product!

Posted

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! :P

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!

Posted

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.
Posted

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 :P , 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!

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...