Sign in to follow this  
Followers 0
ArxBzFhblxphS

..

2 posts in this topic

#1 ·  Posted (edited)

Posted Image Edited by Thanubis

Share this post


Link to post
Share on other sites



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

Share this post


Link to post
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
Sign in to follow this  
Followers 0