Jump to content
Macro Express Forums

acantor

Members
  • Content Count

    936
  • Joined

  • Last visited

  • Days Won

    6

acantor last won the day on May 29

acantor had the most liked content!

Community Reputation

9 Neutral

About acantor

  • Rank
    Master

Contact Methods

  • Website URL
    www.cantoraccess.com
  • ICQ
    0

Profile Information

  • Location
    Toronto

Recent Profile Visitors

672 profile views
  1. There is a good reason to capture scripts via Macro Express: it's a way to become familiar with a limited number of Macro Express instructions. But often, the resulting scripts have limited practical value. The scripts tend to fail, sometimes spectacularly. Given your struggles, maybe it's time to move on from recording (inherently unreliable) scripts to developing scripts that reliably perform simple tasks by sending keystrokes, moving the mouse pointer, and clicking. For a beginner, there may be a learning curve to figure out how to make these scripts work every time and in every context, but it's time well spent. Decide on a task to perform. Create the first line in Macro Express. Test. If it works, add the second line of instructions. Test. And so on.
  2. The problem you are experiencing may relate to your Macro Express settings. In the Macro Express Explorer, choose Options > Preferences... > General > Capture, and make sure keystrokes and mouse actions are set properly.
  3. You're right, rberq, it took digging before I stumbled upon Shift + Ctrl + equal sign. As a (mostly) non-mouse user, I already knew Home (go to start of row) and Shift + spacebar (select row). Edited: Only today did I abandon the quest to come up with a satisfactory solution for moving columns. The task requires the insertion point to jump to the topmost cell in a column. I have not yet discovered a way to do this via keyboard that works in every Excel worksheet. My solution sometimes fails.
  4. Here are my scripts for moving an entire Excel row down and up, without the need to select the row. The row that is moved is always the one that has keyboard focus. Each script is only five lines long. I tested a version that combined all five lines into a single "Text Type" instruction. It worked. But the challenge wasn’t to create a solution with the fewest lines of code. It’s much clearer when broken up this way: Move row down: Text Type (Simulate Keystrokes): <HOME> // Must start selection from Column A Text Type (Simulate Keystrokes): <SHIFT><SPACE> // Select the row Text Type (Simulate Keystrokes): <CONTROL>x Text Type (Simulate Keystrokes): <ARROW DOWN><ARROW DOWN> Text Type (Simulate Keystrokes): <SHIFT><CONTROL>= // Insert a row <TEXT TYPE Action="0" Text="<HOME>" _COMMENT="Must start selection from Column A "/> <TEXT TYPE Action="0" Text="<SHIFT><SPACE>" _COMMENT="Select the row"/> <TEXT TYPE Action="0" Text="<CONTROL>x"/> <TEXT TYPE Action="0" Text="<ARROW DOWN><ARROW DOWN>"/> <TEXT TYPE Action="0" Text="<SHIFT><CONTROL>=" _COMMENT="Insert a row"/> Move row up: Text Type (Simulate Keystrokes): <HOME> // Must start selection from Column A Text Type (Simulate Keystrokes): <SHIFT><SPACE> // Select the row Text Type (Simulate Keystrokes): <CONTROL>x Text Type (Simulate Keystrokes): <ARROW UP> Text Type (Simulate Keystrokes): <SHIFT><CONTROL>= // Insert a row <TEXT TYPE Action="0" Text="<HOME>" _COMMENT="Must start selection from Column A "/> <TEXT TYPE Action="0" Text="<SHIFT><SPACE>" _COMMENT="Select the row"/> <TEXT TYPE Action="0" Text="<CONTROL>x"/> <TEXT TYPE Action="0" Text="<ARROW UP>"/> <TEXT TYPE Action="0" Text="<SHIFT><CONTROL>=" _COMMENT="Insert a row"/> If you want to try these scripts, set scope to window-specific. Depending on the version of Excel you are using, you will either need to specify a partial match to: "Excel -" or "- Excel" Check the title bar in Excel to discover whether the hyphen goes before or after the word "Excel." The hotkeys I chose for these scripts are Alt + Shift + down arrow (to move the row down), and Alt + Shift + up arrow (to move the row up). I opted for these hotkeys because they parallel the hotkeys available by default in Word, Outlook, and PowerPoint. But of course you can choose any activation you like.
  5. The challenge was to create two Macro Express scripts: one to move the current paragraph up, and the other to move the current paragraph down, without the need to (manually) select any text. The inspiration for the challenge is Alt + Shift + up and down arrows in Word, which move the current paragraph without selecting it. (These built-in commands don't use the clipboard, but the Macro Express scripts likely will.) Anyone want to give this challenge a shot for Excel? The task is to create two hotkeys that move the current ROW up or down. I'll post a solution soon.
  6. What prefix are you using? Test your macros with a different prefix, preferably one-character long instead of the two-character default "##", e.g.,: Q , / or something similar. What applications are your macros failing in? Is the scope of these macros global or window/program specific? Do the macros fail if you add a hotkey activation?
  7. Cory, thank you for pointing out a tremendously useful Macro Express instruction. I wasn't aware of it.
  8. Yep, you got it, Ctrl + Down and Ctrl + Up. So the keyboard shortcuts are similar to the similar Office commands (Shift + Ctrl + Down and Shift + Ctrl + Up). The keyboard shortcuts for Duplicate Command (Ctrl + D) and Comment (Ctrl + Alt + C) are listed in the "Edit" menu of the Script Editor. Too bad "Comment" cannot be Ctrl + C because that's the standard Windows keyboard shortcut for Copy to the clipboard. (On the other hand, if someone needs to sprinkle comments in their scripts more than they need to copy lines to the clipboard, they can create a window-specific Macro Express script triggered by Ctrl + C, that outputs Ctrl + Alt + C... Text Type (Simulate Keystrokes): <CONTROL><ALT>c As you observed, pressing Ctrl + X causes selected line(s) to vanish, but that's because the information is "Cut." This keyboard shortcut works almost everywhere in Windows. The cut text resides in the clipboard and is available for pasting.
  9. Here is a challenge within the challenge. In the Macro Express Script Editor, there are two icons at the top of the vertical bar that runs along the right side of the screen. Click the top icon to move the current line upwards (without selecting it), and the icon beneath it to move the current line down. If more than one line is selected, the icons act on the entire block of lines rather than one line. These two commands parallel the paragraph-moving functionality in Word, PowerPoint, and Outlook. And like the Office commands, the Macro Express commands don't use the clipboard. It turns out that there are keyboard equivalents in the Script Editor for performing these tasks. They appear to be undocumented. (At least, I couldn't find them... I discovered the keyboard shortcuts by accident.) Through trial-and-error experimentation, can you figure out the two built-in keyboard shortcuts for moving text within the Script Editor? And while you are at it, figure out the built-in keyboard shortcuts for the third and fourth icons, i.e., duplicate line (or several selected lines), and add a comment? (Hint: These two shortcuts are documented.)
  10. Your finding is surprising, but you're right. I'm sure this was not the case in earlier versions of Word. (I'm using Word 2019). So the instruction now works in Word, although not everywhere in Word. 1. In a document: yes. 2. In the ribbons, yes if the item is a field where the user can type (e.g., Home --> Font name drop-down, or to its right, the Font Size drop-down). 3. But apparently not when the focused item in a Ribbon is a button or similar control (e.g., Home --> Bold, Italics, etc.) 4. In dialog boxes and panels: Same as 2 and 3 above.
  11. That's right. Macro Express must be running. You can set Macro Express to start automatically whenever your computer starts: From the Macro Express Explorer: Options Preferences... Startup Windows Startup Run when Windows starts up [check]
  12. Date/Time: Type out the current date/time using "d mmmm yyyy" as the format I use "d mmmm yyyy" format for my macro, but it can be changed to whatever format suits you.
  13. I'm wondering whether your macro for moving paragraphs in Notepad would be amenable to routing the mouse cursor to the text cursor position. I don't remember whether the instruction works in Notepad. I know it DOES NOT work in Word or any browser I've tested it with.
  14. Ha! Google's speech recognition products handle mumbling better than Dragon. On many measures of the usefulness of speech recognition, Google has surpassed Dragon. Since you're an Android user, take a glimpse of the future of speech recognition technology by downloading Google's "Live Transcribe" free app. Nevertheless, Dragon is a remarkable product because of its versatility. It can be used to dictate text, revise text, control a small number of applications, and more -- hands-free. Dragon is most accurate when users speak in long, unbroken utterances (eight or more words without pausing), clearly spoken. No guarantees when mumbling!
  15. But until that future day, there is something that can be done now that is a step in that direction. Use Dragon software, which is third-party speech recognition software for Windows. When Dragon is running on a system, voice-enabling Macro Express scripts is fairly straightforward. (It's less easy with the inexpensive "Home" edition than the Professional editions, but still do-able.) So instead of triggering a script with your thoughts, at least you can trigger a script by saying a few syllables.
×
×
  • Create New...