Jump to content

..


Recommended Posts

I trying to write a script that uses the WinMinimizeAll() and WinMinimizeAllUndo() together on an alternating basis. Running the script the first time should minimize all windows, running it a second time will undo the minimize.

I know I need an If... Then statement, but I have no idea what my If condition should be. I know that the WinMinimizeAllUndo() command won't work unless WinMinimizeAll() is used first, so how does AutoIt/Windows tell it was used before the Undo command is used?

Like this;

Local $prevRun = 0

$prevRun = [b]WinMinimizeAll()[/b]

;Some others ...

If $prevRun Then
    [b]WinMinimizeAllUndo()[/b]

    If NOT @Error Then
        $prevRun = 0
    EndIf
EndIf
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...