Jump to content
Macro Express Forums

How 2 Avoid Recursive Call?


Recommended Posts

The database program uses the F9 key to open a file that is listed in a field by running the program associated with the extension of the text in the field and opening that file.


The database program uses the F9 ONLY when there is a certain view "documents".


There is another view "Facts" where the F9 key does not do this. But by other mouse/key strokes, I can open the linked file just as F9 does.


I've written a macro that does all those steps, but...


I can determine which view I'm in and use logic to choose which program branch executes. If I see that the DBF is in the "documents" view, I would like the macro to text in "F9" and let the internal DBF function work. Since Macro Express traps the F9 keystroke, if I have the macro Key F9, the macro runs again (only once though and puzzles me but I don't care). I thought there'd be a "IF MACRO RUNNING" function, but not. I tried "disabling the F9 macro before "keying in the F9" but that doesn't seem to do it.

I know I can adopt another hotkey altogether and either run my code or key in F9, but that's "inelegant" <g>.


Is there a "key in 'non-macro triggering' text"?

Link to comment
Share on other sites

Perhaps you could use the Scope properties to allow the HotKey activated macro to run only when a certain window or program is running.


I also use another approach for one of my macros. When I press the HotKey the macro checks a series of window titles and/or program names using the If Window Title is on top and/or If Program Name is running macro commands. If non of the programs or windows are found, then I perform a TextType of the original HotKey. This works quite well for me.

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.

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.

  • Create New...