Close all windows

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
buba

Close all windows

Post by buba » Fri Jun 20, 2003 12:07 am

How can I set the script to close all windows before doing the backup?
thanks

Lumumba

Post by Lumumba » Mon Jun 23, 2003 7:25 pm

Have a try,

Code: Select all

CapsOff

//Use Taskmanager to activate existing windows
Press ALT
Press TAB
Release ALT
WaitWindowOpen>*

Label>Next
GetActiveWindow>window,x,y
//Program Manager=The name of a window commonly known as --> Desktop
If>window=Program Manager,Backup
CloseWindow>%window%
Wait>1
Goto>Next

Label>Backup

buba
Newbie
Posts: 3
Joined: Fri Jun 20, 2003 1:05 am

thanks

Post by buba » Mon Jun 23, 2003 7:58 pm

I have the dell keyboard, and the Alt key would not activate the menu..
I have to modify the key. But I got your tips

thanks

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Mon Jun 23, 2003 9:49 pm

Hi Lumumba...

Nice routine to handle that.

But shouldn't the Label>Next be at the top of the first section, before press the ALT-TAB combination? Change shown below:
//Use Taskmanager to activate existing windows
Label>Next
Press ALT
Press TAB
Release ALT
WaitWindowOpen>*

GetActiveWindow>window,x,y
//Program Manager=The name of a window commonly known as Desktop
If>window=Program Manager,Backup
CloseWindow>%window%
Wait>1
Goto>Next

Label>Backup

Lumumba

Post by Lumumba » Tue Jun 24, 2003 5:20 am

Correct! :wink:

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts