Window Activation Problem

General Macro Scheduler discussion

Moderators: Dorian (MJT support), JRL

Post Reply
Mayhem
Junior Coder
Posts: 25
Joined: Tue Apr 22, 2003 6:34 pm

Window Activation Problem

Post by Mayhem » Mon May 05, 2003 2:43 am

I'm having troubles getting my macro to activate on window title.

It used to work, but since i've upgraded to 7.2.034e .. it stopped working.

Anyone else having this problem?

thanks,

Ken Jensen
Mobile Computer Service

Mayhem
Junior Coder
Posts: 25
Joined: Tue Apr 22, 2003 6:34 pm

Post by Mayhem » Tue May 06, 2003 4:07 pm

Could someone try their Macro to start on Window Title and see if it works?

I'm scratching my head on this one

Thanks

Ken Jensen
Mobile Computer Service

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 » Wed May 07, 2003 9:28 pm

Using 7.2.034, and Win98SE

I just ran a macro triggered by Window Name and got some interesting results.

I had a macro that displays some Message windows. I ran it from the MS Control Panel and all was OK.

I set the Run When Advanced WindowEvent WindowName value to "Document - WordPad*". I opened up WordPad, and no indication that Macro was running. (Confirmed your problem)

I then set the Window Name by adding an asterisk to the name, resulting in "Document - WordPad*". when I closed the Macro Properties wintow, the macro actually ran. (That was not expected, but it appears to have happened because WordPad was already open).

I closed WordPad and opened it up again. This time the macro appeared to be working. (Fixed your problem).

I say appeared, because the Message Windows did not display to the screen. The systray icon was flashing, and when completed, I reviewed the log to confirm that the macro actually ran.

I then closed WordPad, and ran the macro again, this time from the Launch Bar. Once again, the Message windows were not appearing, but the systray icon was flashing, and when completed, I reviewed the log to confirm that the macro actually ran.

I edited the macro, adding Wait>3 after the messages, but they still do not display when not started from the MS Control Panel.

I then used MS Scheduler to start the macro. When the correct time started the macro, once again, the Message windows were not being shown on the screen, but the macro did run as snown by the flashing icon, and confirmed with the log.

Conclusions:
1. The solution to your problem is to add the asterisk (*) to the Window Name you want to trigger the macro.

2. New problems exist:
A. Why does macro trigger when closing Macro Properties window and the Trigger Window is open? I don't believe that should happen.
B. Why does macro not display Messages when triggered by Window Name? Defeats the purpose of the Messages.
C. Why does macro not display Messages when started from
Quick Launch? Defeats the purpose of the Messages.

I am going to move the last two items to a new Subject on the forum: "Triggered macros not displaying Messages"
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

Mayhem
Junior Coder
Posts: 25
Joined: Tue Apr 22, 2003 6:34 pm

Post by Mayhem » Wed May 07, 2003 10:11 pm

Window activation does not work at all for me.

I've tried with / without an * after the window title and i get no results.

It worked before i upgraded to 7.2.034e


Ken Jensen
Mobile Computer Service

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 » Wed May 07, 2003 10:55 pm

I just upgraded to 7.2.035 and suddenly the trigger from the Windows Name was not working (as you described, but worked OK for me earlier).

But then I saw that I had scheduling disabled. Although I did not consider this a scheduing issue because it did not depend on the clock, I reenabled Scheduling, and the macro ran when WordPad was opened (Still not showing the Messages, but that's another issue).

Conclusion:
When I removed the Disable Schedule and opened the WordPad protram, the macro did run. Apparently the "Scheduel Enabled" switch affects the Advanced Options event triggers in addition to those set by the clock.

:idea: Perhaps that could be made a little more clear in the Help section? This section from the Help page on Scheduling Scripts could be added to the Help page for Advanced Scheduiling Options:
If you have created a schedule for a macro, but wish to temporarily stop scheduling without changing the schedule details, you can do so from the pop up menu of the script list on the main Macro Scheduler window.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Thu May 08, 2003 9:05 am

Window Event is part of scheduling so it takes effect as soon as the schedule settings are closed. In the same way that if the time was currently 10:30 and it is Monday and you set the schedule to 10:30 on a Monday the macro would run when you closed the macro properties, so it will run if the window given in Window Event is open.

Window Event uses the same process as the windowing functions and view system windows tool to locate the window so you need the same considerations. We use a number of window event macros and haven't had a problem.

If you disable scheduling you disable all scheduling features. Schedule means a program of events. They don't have to be time based.
MJT Net Support
[email protected]

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 » Thu May 08, 2003 2:47 pm

Thanks for confirming my observations and explaining those processes.

I haven't used Window events as a trigger before, but no one was helping Mayhem, that is why I tried this out. It is important to see if others have the same issues as you do, or are you just doing something wrong.

I was not having the problem, but just trying to duplicate for Mayhem.. I made note of my first experiences, which were kind of unexpected.

So, my status is that I do not have a problem, and was not able to duplicate his problem (sounds familiar?). But I now have a better understanding of the Window Event trigger and the broader use of the Schedule Enable function. Thanks again for that info.

But it sounds like Mayhem still does have the problem?
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

Mayhem
Junior Coder
Posts: 25
Joined: Tue Apr 22, 2003 6:34 pm

Post by Mayhem » Thu May 08, 2003 4:18 pm

It's not critical for me to have this feature at this very moment but ..

Yes, i'm still having problems with window activation.

With schedual on/off & window title activate with * or not, i'm unable to get my macro to run (on window activation)

Maybe it's just me.

I'm using Windows XP Pro with SP1

I have 5 computers networked together, but unfortunatly all using XP Pro.

So there's no way for me to see if i get the same results with a different OS.


Ken Jensen
Mobile Computer Service

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Thu May 08, 2003 5:58 pm

Hi,

Can you email a screen grab of the window to [email protected]

Can you also look under Tools/View System windows and type what you are typing in the window event box and see which window it finds in the list. There could be another window with a similar name.

Also what happens with a simple one line script with just SetFocus in it to focus the window you are trying to detect with the window event schedule?

Please email details above to [email protected] and we'll see if we can work out what is going on.
MJT Net Support
[email protected]

Mayhem
Junior Coder
Posts: 25
Joined: Tue Apr 22, 2003 6:34 pm

Post by Mayhem » Thu May 08, 2003 7:39 pm

I emailed you with the details you requested.

Come to think of it .. I recently installed Norton SystemWorks 2003 on all my machines.

I haven't used window activation macros since before the install.

I'm wondering if for some odd reason, that this is messing things up?

One of the Norton's features (which is auto installed) is "script blocker" (but this is disabled)

I can't see anywhere i can uninstall it.

So after all, mabye my problems are due to something i have done :oops:

Will keep you posted on my progress.

Ken Jensen
Mobile Computer Service

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