terrypin Posted November 26, 2011 Report Share Posted November 26, 2011 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? -- Terry, East Grinstead, UK Quote Link to comment Share on other sites More sharing options...
acantor Posted November 27, 2011 Report Share Posted November 27, 2011 It's doable, although not obvious... 1. Press Tab seven times. 2. Press Alt + underlined letter. Unfortunately, once the radio buttons have focus, the up and down arrow keys do not work, which is the expected behaviour. Quote Link to comment Share on other sites More sharing options...
terrypin Posted November 27, 2011 Author Report Share Posted November 27, 2011 Thanks Alan, that's what I was looking for. (I make it five tabs, not seven. That's after opening the dialog, with the text cursor in the hotkey box. 5 tabs later I can use Alt+underline to select the type.) -- Terry, East Grinstead, UK Quote Link to comment Share on other sites More sharing options...
acantor Posted November 27, 2011 Report Share Posted November 27, 2011 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. Quote Link to comment Share on other sites More sharing options...
terrypin Posted November 28, 2011 Author Report Share Posted November 28, 2011 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 Quote Link to comment Share on other sites More sharing options...
acantor Posted November 29, 2011 Report Share Posted November 29, 2011 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. Quote Link to comment Share on other sites More sharing options...
terrypin Posted November 29, 2011 Author Report Share Posted November 29, 2011 Got it! (I'd inadvertently switched to the Add Activation window.) The one-liner makes it redundant, of course, but as I've rarely used Controls that was a useful learning exercise, thanks. -- Terry, East Grinstead, UK Quote Link to comment Share on other sites More sharing options...
acantor Posted November 30, 2011 Report Share Posted November 30, 2011 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.