Jump to content
Macro Express Forums

Activate Window command quits working


margaret
 Share

Recommended Posts

Why would an Activate Window command that has worked succesfully so far in 32 macros suddenly stop working? I tried adding a "Wait for Window Title to Appear," but that didn't help. What happens is that in the window that is active when the Activate Window command should occur, the title bar appears to lose focus. But the window that was supposed to activate doesn't, and there's no "running man" icon, error message, etc.

I'm doing the same thing I've done many times, so I'm baffled why it would stop working.

 

[added later]

Now I realize this has happened once before, in a similar situation (I had been changing other parts of the macro and then testing, and the other parts that I'm changing appear to have nothing to do with the problem). Although I haven't had any other problem related to changing-saving-then-retesting, now I'm wondering if it's rebooting Macro Express that made the difference, not rebooting the machine. I don't think I can reproduce the problem on purpose, but if it happens again I'll try rebooting Macro Express first.

Link to comment
Share on other sites

I have run into problems before with window controls... when I save a line using the get control utility and then restart the program the macro won't work right until I run the get control utility again.... maybe you are experiencing a similar problem?

 

My philosophy is when all else fails copy and paste the macro, delete what you're working on and write it again from scratch.

 

If you used the running window titles menu to grab the menu title instead of entering it manually (remember that it WILL accept a partial match even if it doesn't begin with the word - such as "Microsoft Outlook" in that field WILL find the "Calendar - Microsoft Outlook" window) then you may need to go back in and select it again or manually enter a partial title.

 

In other words: Recreate the line! :)

 

Hope that helps!

 

-Rand

Link to comment
Share on other sites

I have run into problems before with window controls... when I save a line using the get control utility and then restart the program the macro won't work right until I run the get control utility again.... maybe you are experiencing a similar problem?....

 

If you used the running window titles menu to grab the menu title instead of entering it manually (remember that it WILL accept a partial match even if it doesn't begin with the word - such as "Microsoft Outlook" in that field WILL find the "Calendar - Microsoft Outlook" window) then you may need to go back in and select it again or manually enter a partial title.

 

Hope that helps!

 

-Rand

Hi,

 

Well, with your window control example, you seem to be describing a predictable problem, and this problem isn't predictable. It happens only once in a while and only durng a session of making changes to the macros. I can't predict when it will happen and I can't make it happen on purpose.

 

I have manually entered the window title and it is a partial match. It's not that the match doesn't work. It's that the whole command only partially works now and then -- but not that often, since I've changed these macros thousands of times and it's only happened twice. (Of course now when I want it to happen so that I can test whether rebooting Macro Express but not rebooting Windows would fiix it, it's not happening.) :)

Link to comment
Share on other sites

It happens only once in a while and only durng a session of making changes to the macros.

What do you mean by "during a session of making changes to the macros"? I have been puzzled a couple times where a window title partially matched a macro title, and using the ME script editor caused the title-activated macro to run. So if ME tried to activate a window, which one will it activate, the script editor window or the "real" application window?

Link to comment
Share on other sites

What do you mean by "during a session of making changes to the macros"? I have been puzzled a couple times where a window title partially matched a macro title, and using the ME script editor caused the title-activated macro to run. So if ME tried to activate a window, which one will it activate, the script editor window or the "real" application window?

 

Hi rberg,

 

I mean that if I'm just using or testing the macros, just running them, this problem never happens. It only happens when I have been making changes to the macros since the last time I opened ME. I have four sets of similar macros [that do the same thing in four different situations] which are "evolving" as I keep figuring out new things and adding them. But this problem doesn't happen every time I make changes.

 

Something along the lines of what you're talking about happened to me once, although it didn't run the macro. It just switched me into ME instead of switching me where I wanted to go. So I changed my macro names so that they couldn't possibly be confused with the application window that I wanted. If you have a macro open in the Explorer at the time, then you could have, say, one window title of FileMaker and a window title of FileMakerMacro2 in ME. If I remember correctly, it activated the script editor window instead of the application window. So I was back in ME and didn't know why at first. :) If you don't have the macro open in the Explorer, then the macro title won't be in the ME window title, so the name won't matter.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...