Jump to content
Macro Express Forums

Setting activation type with Keyboard?


Recommended Posts

Is it possible to choose an activation type using keystrokes rather than the mouse? Presumably Alt+H should choose Hotkey, Alt+S = Shorkey, etc. But as Hotkey is already selected by default, using one of these combinations just sets that as the Hotkey! Am I missing something obvious here please?

 

MEPro-Activation-Shortcuts.jpg

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

I just tried again. Now I find that I only have to press Tab once. Then I can press Alt + whatever.

 

Here is a script that automatically places the focus ib the Nickname field when the "Create New Macro" window opens.

 

Get Control: (MACEDIT.EXE) Using z-order -> %NicknameField%
Set Focus to %NicknameField%

 

Set the activation to Window Title: "Create New Macro" (exact match) when Window is opened.

 

Set the Scope to Global.

Link to comment
Share on other sites

Thanks Alan, but can you post the code or describe exactly how you constructed the Get Control, as I'm unable to get it working here.

 

This is my code:

 

<GET CONTROL Flags="1" Program_Name="MACEDIT.EXE" Class="TfrmAddAct" Title="Add Activation" Variable="%NicknameField%" Caption="Add Activation" Partial="FALSE" Wildcards="FALSE"/>
<SET FOCUS Control="%NicknameField%"/>

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

I think you may be on the wrong screen.

 

1. Create a new macro -- let's call it A.

 

2. Go back to Macro Explorer, and create a second new macro. Let's call it B.

 

3. Activate the "Get Control" utility in B to capture the "Macro Nickname" field on the "Create New Macro" screen for A.

 

Alternatively, this script works nicely if the script consists only of this line:

 

Text Type (Simulate Keystrokes): <TAB><TAB><TAB>

 

Which automatically tabs to the Macro Nickname field when the window opens.

Link to comment
Share on other sites

The one-liner makes it redundant, of course, but as I've rarely used Controls that was a useful learning exercise, thanks.

 

I thought you might like it. The one-liner is a perfectly good approach, but I can imagine it failing under certain conditions. The control-based approach, on the other hand, inches us closer to a programmatic way to script reliable macros.

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...