Jump to content

Need Help by If and Else


Recommended Posts

Hallo

I work not long with AutoIt but I have make a little Script which start a Programm for Clean Temp Files

First here is the Script

Run("C:\Programme\Aufräumen\CCleaner\ccleaner.exe")

WinWait("CCleaner")

Send("!+r")

Sleep(3000)

WinActivate("CCleaner")

Send("!")

Send("i")

Send("!+s")

WinWait("CCleaner" , "&Scan for Issues")

If WinExists ("Fix issues") Then

ControlClick("Fix issues", "",3)

WinWait("CCleaner")

WinActivate("CCleaner")

ControlClick("CCleaner", "", 1)

Else WinClose("CCleaner" , "")

EndIf

I Not know why not work until WinWait("CCleaner" , "&Scan for Issues") its all ok

then Script stop

Any Idea

Thanks much for Help

Icemaan

Edited by Icemaan
Link to comment
Share on other sites

Hallo

I work not long with AutoIt but I have make a little Script which start a Programm for Clean Temp Files

First here is the Script

I Not know why not work until WinWait("CCleaner" , "&Scan for Issues") its all ok

then Script stop

Any Idea

Thanks much for Help

Icemaan

So the script stops at WinWait("CCleaner" , "&Scan for Issues")? Are you sure that's the exact text in the Window that appears. Try just using the title or make sure that the text is exact.

EndFuncAutoIt is the shiznit. I love it.
Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...