frameingreen Posted February 22, 2017 Report Share Posted February 22, 2017 if there's a command in a script: "Text Type (Simulate Keystrokes) <ALT>", it doesnt work as expected. It seems as if it has been realized something like if <ALT> is typed, there will follow at least 1 character to complete a commandIf at least 1 character (or number or something) follows: simulate keydown <ALT>, simulate following character(s), simulate keyup <ALT> If NO character (or number or something) follows (means only to simulate <TAB>): simulate nothingand wait for next character to type (simulate) and then simulate keydown <ALT>, simulate following character(s), simulate keyup <ALT> With this behavior, there's a general problem with some Applications (i.e. Outlook 2016): I need to press (down and up) <ALT>, that means <ALT>, and nothing else! to activate, that outlook can be controlled by keyboard. That doesn't work in ME. So i can't automate "lock sender" (because of spam). Quote Link to comment Share on other sites More sharing options...
Cory Posted February 22, 2017 Report Share Posted February 22, 2017 Alt isn't actually a key like the letter "C". It's a modifier. So by itself it's usually interpreted as nothing. Read the Wiki here. Quote Link to comment Share on other sites More sharing options...
Cory Posted February 22, 2017 Report Share Posted February 22, 2017 If you're working in Outlook you should consider using a VBA macro. They run grammatically within Outlook. This looks like a good article. Quote Link to comment Share on other sites More sharing options...
Samrae Posted February 22, 2017 Report Share Posted February 22, 2017 I need to press (down and up) <ALT>, that means <ALT>, and nothing else I find <ALT> often does not work, specifically with Office programs. I generally use <ALTD> and <ALTU> instead. Have you tried Text Type (Simulate Keystrokes): <ALTD><ALTU> Outlook may even want a small delay in between: Text Type (Simulate Keystrokes): <ALTD> Delay: 0.05 seconds Text Type (Simulate Keystrokes): <ALTU> or this Keystroke Speed: 30 milliseconds Text Type (Simulate Keystrokes): <ALTD><ALTU> Keystroke Speed: 0 milliseconds Quote Link to comment Share on other sites More sharing options...
rberq Posted February 22, 2017 Report Share Posted February 22, 2017 Ditto what Samrae said. I have always found <ALTD> followed by <ALTU> to be more reliable, whether used with an intervening key or not. It's worth a try in your case. Quote Link to comment Share on other sites More sharing options...
acantor Posted February 23, 2017 Report Share Posted February 23, 2017 I have rarely found a reason to use <ALTD> and <ALTU>. I find <ALT> works fine as a modifier key. <ALT> by itself moves focus from the active window to the menu bar, or, if the application uses ribbons, to the ribbon. Little known factoid: <F10> does exactly the same thing. So to activate the File menu: <ALT>f (You must use lowercase f; <ALT>F is equivalent to <ALT><SHIFT>f, which in some applications does nothing; but in some applications it is a hotkey. For example, in Word, <ALT><SHIFT>f changes the style to "Footnote Text Style") Similarly, to activate the Home ribbon: <ALT>h In Macro Express, there are several ways to code these kinds of key sequences: Text Type (Simulate Keystrokes): <ALT>h // Easiest way or Text Type (Simulate Keystrokes): <ALT> // First, move focus to the ribbon Text Type (Simulate Keystrokes): h // Then, activate the Home ribbon or Text Type (Simulate Keystrokes): <ALTD>h<ALTU> // This is overkill in my view! For standard Windows hotkeys like Alt+F4 and Alt+spacebar, these work nicely: Text Type (Simulate Keystrokes): <ALT><F4> // Close this windowText Type (Simulate Keystrokes): <ALT><SPACE> // Activate the System menu for this window Quote Link to comment Share on other sites More sharing options...
Cory Posted February 23, 2017 Report Share Posted February 23, 2017 I think frameingreen is using Alt to toggle the ribbon menu shortcuts on. Frameingreen you might look for an existing keyboard shortcut in your application. EG Ctrl+P to print. You can find several lists online. Quote Link to comment Share on other sites More sharing options...
acantor Posted February 24, 2017 Report Share Posted February 24, 2017 If it's a command on a ribbon in an Office product that you want to access, and there is no default hotkey for the command, I find this approach works nicely. In this example, I am automating "Paste Special" in Word. You may need to a short delay between the first and second lines to make it reliable. Text Type (Simulate Keystrokes): <ALT>h // Home ribbon Text Type (Simulate Keystrokes): v // Paste Text Type (Simulate Keystrokes): s // Paste Special... Text Type (Simulate Keystrokes): Unf // Select "unformatted" from the listview (only the first few letters are needed) Text Type (Simulate Keystrokes): <Enter> // Activate the default button (OK) 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.