Scott_W Posted April 26, 2018 Report Share Posted April 26, 2018 Hello, Migrating a useful script that copies/pastes content from my visitors registry to Notepad and just moving the cursor down the page with an <Enter> keystroke works fine. However, now I want to manage my entries in Excel so I can organize them better. If I manually navigate my excel spreadsheet to each pre-defined LABEL using the <Ctrl>G keystroke combination, my cursor jumps to the appropriate cell. Why can't Macro Express-Pro do the same? I've tried the following, and a few variations; but none will activate the "Goto" feature in Excel. (even with delays built in like this) <DELAY Flags="\x01" Time="2"/> <TEXT TYPE Action="0" Text="<CTRLD>"/> <DELAY Flags="\x02" Time="500"/> <TEXT TYPE Action="0" Text="G"/> <DELAY Flags="\x02" Time="500"/> <TEXT TYPE Action="0" Text="<CTRLU>"/> <DELAY Flags="\x01" Time="1"/> <TEXT TYPE Action="0" Text="Friend_Family<ENTER>"/> <DELAY Flags="\x01" Time="1"/> I've even tried this - <TEXT TYPE Action="0" Text="<CONTROL>"/> Variations of Double-Control, etc....even placing them on the same line. Any ideas? Thanks in advance. Quote Link to comment Share on other sites More sharing options...
Cory Posted April 26, 2018 Report Share Posted April 26, 2018 Text Type (Simulate Keystrokes): <CONTROL>g Works for me. 1 Quote Link to comment Share on other sites More sharing options...
Scott_W Posted April 26, 2018 Author Report Share Posted April 26, 2018 Cory...... - Macro-Master........ Thank you. Can't believe I was beating on all those other - unproductive options. It worked. Thanks again, Scott Quote Link to comment Share on other sites More sharing options...
amonaghan Posted April 26, 2018 Report Share Posted April 26, 2018 Oddly, when I try <Control>g from a Popup Menu, it doesn't work. That is, a menu item which simply has the command - Text Type (Simulate Keystrokes): <CONTROL>g Quote Link to comment Share on other sites More sharing options...
acantor Posted April 30, 2018 Report Share Posted April 30, 2018 My guess is that Excel does not have focus when you activate the Popup menu item. If that's the case, Excel is not receiving the key combination. Quote Link to comment Share on other sites More sharing options...
Scott_W Posted April 30, 2018 Author Report Share Posted April 30, 2018 8 hours ago, acantor said: My guess is that Excel does not have focus when you activate the Popup menu item. If that's the case, Excel is not receiving the key combination. Thank you for this follow-up. I do/did have preceding Focus & Wait For commands to ensure Excel focus first.....and navigated one cell down before trying to execute the crtl-G. It was the use of the capital G in Ctrl-G that caused the problem. Using Ctrl-g worked. In fact, after comparing similar scripts from my past works, I realized that I didn't use caps in Excel before; but did get away with CAPS in Notepad. Subtle differences.... Quote Link to comment Share on other sites More sharing options...
terrypin Posted April 30, 2018 Report Share Posted April 30, 2018 On 4/26/2018 at 11:35 PM, amonaghan said: Oddly, when I try <Control>g from a Popup Menu, it doesn't work. That is, a menu item which simply has the command - Text Type (Simulate Keystrokes): <CONTROL>g I agree with @acantor about the likely cause. Most of my Excel macros are in pop-menus and their initial commands ensure that the target workbook/worksheet is activated. Sometimes automatically (e.g. with a Window Activate), or manually (e.g. with a TBD like "Ensure the target worksheet is selected. Then close this to continue"). BTW, I've (re) learnt a little Excel VBA recently and wherever possible I try to do the task with that, particularly if operating on multiple cells/rows/columns, as it's so much faster than MEP. Or combine VBA macros with the MEP macro. P.S: Did you get your scheduled macros working? Quote Link to comment Share on other sites More sharing options...
Cory Posted April 30, 2018 Report Share Posted April 30, 2018 You're welcome. I think many people get stuck on the idea that you need to issue up/down because they exist. But in my experience it's rare one needs it. Usually for something like multiple keystrokes. Remember, CTRL, ALT, Shift, Win are all modifier keys and don't have values. They're like an adjective. Quote Link to comment Share on other sites More sharing options...
acantor Posted May 1, 2018 Report Share Posted May 1, 2018 I'm with Cory. I rarely find wrap key presses with up and down modifiers, and my MEP scripts generally work as expected. The only time I have noticed that up and down modifiers make a difference is when I uncheck "Wait for the hotkey to be released before activating." But I find MEP scripts that are activated upon hotkey press are flaky and unreliable. So I rarely use this feature. 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.