Jump to content
Macro Express Forums

Sending keystrokes which are hotkeys


Recommended Posts

Say i have a keyactivated macro (Alt + 1). Is it possible to let MEX type Alt + 1 without this macro gets activated? Somehow those macros do not work.

 

I had the picture that MEX is "locatated" between my keyboard and the pc and for this reason can distinguish between keycommands getting from the keyboard and simulating keystrokes (sending them to the pc).

 

But MEX seems to have difficulties simulating keystrokes which are assigned to another macros.

 

Thank You

Alexandra

Link to comment
Share on other sites

Say i have a keyactivated macro (Alt + 1). Is it possible to let MEX type Alt + 1 without this macro gets activated? Somehow those macros do not work.

 

Hi there,

I created two macros, M#1 activated by "ALT+1", M#2 activated by "ALT+2". At some stage M#1 text types "ALT+2". So, whenever I run M#1 and it gets to type "ALT+2", M#2 is started. At this stage I have 2 macros runnning at same time. However, the keystroke "ALT+2" was never send to the program it was supposed to. This happened because if you use a combo of keys, and there are macros assigned to it, the combo pressed will be "used up" to start a macro in first place. If you use that combo again, it will send the keystrokes to the window that is focused (sinced macro activated by that combo is already running and can't be run twice, so MEP simply ignores the combo). However this doesn't solve your problems - since another macro is run.

 

Well, I assume my explanation might be a little confusing, anyway, here's the cure :)

 

 

Use Lock Player command in the begging of your main macro. After putting that command in M#1, M#2 was never started and "ALT+2" was successfully sent to the desired window.

 

Hope this helps

 

Arek

Link to comment
Share on other sites

You can have the macro first disable that macro before typing the hotkey then enable it afterwards.

 

Inevitably the hotkey's user want to use are also hotkeys in other apps so it's hard to find one that don't step on something else. I found that using Alt or Ctrl in combo with the 10 keypad numbers are usually free. I think because not all keyboards have the number pad so they avoid them. The downside of course is what to do when your on a laptop that doesn't have it. Usually there's a Fn 10 key on the laptop but that's a pain.

Link to comment
Share on other sites

One neat trick that probably does not apply in this case is to use a double Alt for the running macro.

 

Let's say the running macro has to open a dropdown menu activated by Alt+E but that is also a hotkey for another macro. For activating the menu, use AltAlt+E (<ALT><ALT>E). The menu will drop but the other macro will not run.

Link to comment
Share on other sites

Thanky you so much guys.

I´m still confused.

 

Disabling the disturbing macro sure helps. But that takes time. My Mex-file ist 3 MB with 2400 Macros. If i use the contextmenu (right click) in the MEX Explorer it takes more than a second to dis-, enable a macro. It´s the same for those dis-, enabling commands in macros. Sometimes even those commands do not disable the specific macro.

 

Lock player does not work! I even tried both lock commands in a row (with and without "wait for other macros to stop"). And i locked the disturbing macro ALT + 0 (wait for other macros-command) too. It seems that the keycombo is still "used up" as arekowczarek mentioned. Pressing Alt twice (JohnS Tip) did not work also.

@ JohnS: Did you mean "<ALTD><ALTU><ALTD>10<ALTU>" with pressing ALT twice?

 

The whole story:

The main macro should activate the "Calender - Microsoft Outlook" and enable the Day-View (10 Days) beginning with today. To do this it´s necessary that <ALTD>10<ALTU> is typed out. ALT + 1 and ALT + 0 exists already as programspecific (outlook) macros. Disabling ALT + 1 makes no difference.

 

Disabling ALT + 0 solves the problem. But this is not satisfying. It takes to much time and i want to have an opportunity to type anything regardless what hotkeys i already have.

 

That´s what the lock command is about, no? I have the suspicion that like the "set window order" commands those commands do not what they are supposed to.

 

Thank You

Alexandra

Link to comment
Share on other sites

Pressing Alt twice (JohnS Tip) did not work also.

@ JohnS: Did you mean "<ALTD><ALTU><ALTD>10<ALTU>" with pressing ALT twice?

No, I meant what I typed,<ALT><ALT>E (should be lower case, e!) which in your example would be <ALT><ALT>10 (you had "1" in your first post). You do not have to use AltD and AltU. That may be more universally applicable but not necessary. I never use anything other than Alt+key or doubleAlt+key.

 

I stated that it may not be applicable in your case since a numeric does not generally indicate a menu item. It would depend if the destination application will take the double Alt.

 

The other aspect is that I've never typed Alt+ a double character shortcut (which was not in the original post). I've no idea if that even works with ME and may necessitate the AltD and AltU. <ALT><ALT>10 will probably simulate typing "<ALT>1" followed by "0".

 

There may be issues with the Lock command.

Link to comment
Share on other sites

Interesting!! I always used the ALT down and ALT up commands in the texttype window.

 

Which equals which for example? Does <ALTD>b<ALTU> = <ALT>b ?

 

<ALT><ALT>10 does also not work. So far disabling the ALT+0 Macro is the only way.

The ultimate question is:

Is there a way (Lock commands?) which let MEX ignore texttyped keycommands which normally trigger macros? Not only should MEX not start those associated macros but send that keycommand to the application!!

Link to comment
Share on other sites

Interesting!! I always used the ALT down and ALT up commands in the texttype window.

When all else fails, read the Help!

 

Which equals which for example? Does <ALTD>b<ALTU> = <ALT>b ?

Yes

 

<ALT><ALT>10 does also not work.

I assumed it would not.

 

I cannot simulate your problem because I have Outlook disabled as far as possible. I tried a simple test and Lock worked for me using single-letter access keys. Did you add Lock/Unlock to the Alt+0 and Alt+1 macros with "Wait for Running Macros to Stop" checked in addition to the offending macro? Even if the player lock of the offending macro fails the others should not start - at least that's the way it's intended to work at present. I am not sure if, when the blocking macro finishes, that the waiting macro is supposed to start even if the initiating condition has since disappeared. I've found that not to be the case which would be in your favour.

(edit) I see in earlier posts you did most of the above

 

Can't you change the activation of Alt+0 and Alt+1?

 

I question having 2400 macros in one macro file. How do you find anything? How many hotkeys can you remember? I don't dismiss the use of Categories but I don't use them at all. I group all my macros by macro file per real-world task. If I used Outlook, that would be in my "Internet" macro file. My graphics macros are in my "Graphics" macro file. Guess where my file ops macros are? You could have a "Daily" file with a selection of the most-used. You can copy in existing macros with different unique hotkeys if you so-wished.

 

I never have more than a couple of pages to scroll through in a macro file so I don't need many shortcuts. The most-used I give hotkeys; the rest have activation "None". I activate by right-click and "Run Macro Now" or select and click "Run Macro Now" on the Toolbar. I've never been close to running out of hotkey choices. You can also go to Pop-up menus if you run out.

Edited by JohnS
Link to comment
Share on other sites

I did lock the other macros with "Wait for Running Macros to Stop" checked. Do i need to unlock them too? BTW, that did not make any difference.

 

I have the feeling that Locking is good for not running those macros but keycommands are still used up. Can anybody confirm this?

 

The question remains:

Is there a way (Lock commands?) which let MEX ignore texttyped keycommands which normally trigger macros? Not only should MEX not start those associated macros but send that keycommand to the application!!

 

Thank You

Alexandra

Link to comment
Share on other sites

Do i need to unlock them too?

Normally you add the Unlock command at the end of the macro. Depending on macro design, the bottom of the macro is not always the end eg if you use the Stop command further up. I've never tested the repercussions eg is the player automatically reset when the macro closes for any reason?

Link to comment
Share on other sites

If a lock command causes the macro to wait till other macros are finished, what does the unlock command actually do?

The Lock command prevents other macros from starting (other than those started with "Run Macro Now"). The Unlock command releases the lock and allows others to start. If you use the Lock command with the "Wait for.." checked, the macro in question will not start until all OTHER macros have finished regardless of whether they have locks or not.

Link to comment
Share on other sites

  • 4 weeks later...

After upgrading to 4.1.6.1 i still can´t stop MEX Pro (Win 7) activating itself when i send keystrokes which are hotkeys for other macros (Disturbing Macros).

 

Disabling the disturbing macros in the first place is not acceptable as it takes much to long. Can anybody give me a brief example how to i stop such nasty feedbacks?

 

Thank You

Alexandra

Link to comment
Share on other sites

Can anybody give me a brief example how to i stop such nasty feedbacks?
Yeah, use unique activations. It's what I do and I don't ever have a problem;-)
Link to comment
Share on other sites

Thanks for the tip Cory! I do that as much i can. But sometimes a function in a program is only accessable by a shortcut i already use. I guess that happened to everybody once who uses MEX a lot, no?

 

It´s still hard to believe that MEX can´t distinguish between Keystrokes i type and Keystrokes it types itself, no?

Link to comment
Share on other sites

Thanks for the tip Cory! I do that as much i can. But sometimes a function in a program is only accessable by a shortcut i already use. I guess that happened to everybody once who uses MEX a lot, no?

 

It´s still hard to believe that MEX can´t distinguish between Keystrokes i type and Keystrokes it types itself, no?

It's even harder to believe that a long-time MEX user has failed to grasp such a fundamental concept.

Link to comment
Share on other sites

We're just giving you a hard time Alexis. Do you understand what that means in our language? IE we're making of a joke with you. I forget sometimes English is not your first language since you speak so well here. But we're just having a laugh.

 

I agree that it seems silly that keystrokes executed by MEP would cause MEP activation but it you think about it it makes perfect sense. The keystrokes MEP send are indeed the same as the keystrokes I'm making right now and it has no way to distinguish. My point is it's not a simple mater to avert. We have all had this problem and take special efforts to avoid this problem. For instance my ShortKey macros use a string and double question marks at the end. EG "cid??" to type out the Client ID. Almost nowhere with normal text ever have that string. Also don't forget you can scope your macros. EG if you had a shortkey "XXX" and in a text type command from another macro "XXX could be typed out but the macro was only in word then set the scope to the first macro to global except Word.

 

I suggest you submit a feature request for a check box to disable other activations while running. But until that is implemented you're going to find a way to work around the problem. We all do it. It's not impossible or even difficult. Just takes a little consideration.

Link to comment
Share on other sites

Dear Cory,

 

i noticed that paul was giving me a hard time. I did not know that JohnS was making fun of me too. I wouldn´t be where i am if i would be thin-skinned. So let´s have a laugh and move on.

 

It may sound naive but my model of MEX was that it´s hooks somewhere between keyboard and windowskeyboardinterpreter and for this reason could recognize the difference.

 

I don´t get it. Due to my understanding of english the help (F1) states quite clearly what the lock command is capable of:

 

Since more than one macro may be run simultaneously, this command prevents another macro from starting while the macro containing the Lock Player command runs.

 

This is exactly what i´m looking for! If you say it´s just not working something with the help or the command must be wrong, no? If i know MEX limitations i can work around and use mouse operations instead of keycommands for instance. The problem is that (for my poor english) one suppose that feedback can be supressed if reading that kind of description. You know what i mean?

 

Alexandra

Link to comment
Share on other sites

Guys, you´re killing me.

 

First i thought i was getting some help. Then it was some kind of joke. Now it´s a bug!?! Are you serious?

 

So the Lock commands don´t do what they are supposed to? The should be capable to suppress the selfactivation, right?

 

BTW i have troubles viewing this topic/forum with firefox. IE is doing fine.

Link to comment
Share on other sites

So the Lock commands don´t do what they are supposed to? The should be capable to suppress the self-activation, right?
A macro can never self activate. IOW if your activation is a folder modification and the folder is modified while it's being executed it can not rerun that macro nor will it rerun at the end of that macro.
Link to comment
Share on other sites

I don´t get it. Due to my understanding of English the help (F1) states quite clearly what the lock command is capable of: Since more than one macro may be run simultaneously, this command prevents another macro from starting while the macro containing the Lock Player command runs.This is exactly what i´m looking for! If you say it´s just not working something with the help or the command must be wrong, no? If i know MEX limitations i can work around and use mouse operations instead of keycommands for instance. The problem is that (for my poor english) one suppose that feedback can be supressed if reading that kind of description. You know what i mean?
I don't use this command very often and someone mentioned they thought there was a bug so I did some tests just now and the Lock Player seems to work perfectly.

 

I created two macros, Test1 and Test2. Test one is simply Lock, Pause, and Unlock. Macro 2 is a simple text box display activated by the shortkey "asdfg". If I execute Test1 and go to Notepad and type "asdfg " nothing happens. If I terminate Test1 still nothing happens. IE it was not lying in wait. Then I went back to Notepad and typed "asdfg " again and Test2 executed. Seems to be working perfectly. Does it not work this way for you? If not what version are you running?

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...
×
×
  • Create New...