Program Advertisement

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
Willfred1
Newbie
Posts: 2
Joined: Mon Sep 02, 2013 8:58 am

Program Advertisement

Post by Willfred1 » Mon Sep 02, 2013 9:06 am

The problem i have is te following:

Whant to Close a program window if its open.

CloseWindow>Program1

when the window is open ther is no problem

the problem is when is not open. The macro get me an error and stop it that the real problem becouse is a macro that shuld work unatended

any sugestion to fix it?

sorry for my pour english but is not my mother language

Have a nice day and thx.

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Mon Sep 02, 2013 3:42 pm

So, test to see if it is open or not first:

Code: Select all

IfWindowOpen>Program1 Title
  CloseWindow>Program1 Title
Endif
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Willfred1
Newbie
Posts: 2
Joined: Mon Sep 02, 2013 8:58 am

Post by Willfred1 » Mon Sep 02, 2013 8:08 pm

Thx a lot

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