jsampsonyyyyy Posted October 3, 2023 Report Share Posted October 3, 2023 I have set delay after keystroke down, and delay after keystroke up, to 1000 microseconds. Also under "Use the hardware..." I have set the first box to 1000. However, the contents of the Windows 10 clipboard are not updated by "clipboard cut". Are my delays still not long enough to allow operation of the clipboard? This is Macro Express Pro 6. Quote Link to comment Share on other sites More sharing options...
acantor Posted October 3, 2023 Report Share Posted October 3, 2023 I've used the Clipboard Cut command in Windows 10 without issue. However, my preference is to use Text Type <CTRL>x followed by a very short delay, e.g., 50 or 100 ms. What happens if you substitute Ctrl + x? Quote Link to comment Share on other sites More sharing options...
jsampsonyyyyy Posted October 3, 2023 Author Report Share Posted October 3, 2023 Thanks - substituting Ctrl +x does the same thing. I am trying to write a macro to make the first letter of the last word typed uppercase. What I have is the script: <TEXT TYPE Action="0" Text="<CONTROL><ARROW LEFT>" _COMMENT="Cursor to start of last word"/> <DELAY Flags="\x01" Time="0.2"/> <TEXT TYPE Action="0" Text="<SHIFT><ARROW RIGHT> " _COMMENT="Select first character"/> <DELAY Flags="\x01" Time="0.2"/> <TEXT TYPE Action="0" Text="<CONTROL>x"/> <DELAY Flags="\x01" Time="0.5"/> <VARIABLE SET STRING Option="\x02" Destination="%lastWordFirstLetter%" NoEmbeddedVars="FALSE"/> <VARIABLE MODIFY STRING Option="\x0B" Destination="%lastWordFirstLetter%"/> <TEXT TYPE Action="0" Text="%lastWordFirstLetter%"/> <DELAY Flags="\x01" Time="0.2"/> <TEXT TYPE Action="0" Text="<CONTROL><ARROW RIGHT>" _COMMENT="Cursor to end"/> It all seems to work as expected except that the clipboard contents pasted in are what was there previously. Quote Link to comment Share on other sites More sharing options...
rberq Posted October 3, 2023 Report Share Posted October 3, 2023 Your code looks fine, but I played with it for an hour and got the same result you did, or even stranger. Whatever was in the clipboard before is what gets pasted. I even replaced CONTROL-x with CONTROL-c followed by DELETE -- which should be the same thing -- but it didn't help. Also eliminated the uppercase conversion, to see if it would re-paste the original character, but still no good. Longer delay times were no help. If I do the keystrokes manually the process works, but of course with no upper case conversion. I'm wondering if the CONTROL-ARROW sequences are somehow bothering Macro Express, but I haven't tested for that. Puzzled! Quote Link to comment Share on other sites More sharing options...
acantor Posted October 3, 2023 Report Share Posted October 3, 2023 Your script is not working because of this line: <TEXT TYPE Action="0" Text="<SHIFT><ARROW RIGHT> " _COMMENT="Select first character"/> There's an extra space after Shift + Right, which deselects the selected character, which means there's nothing to cut. Quote Link to comment Share on other sites More sharing options...
rberq Posted October 3, 2023 Report Share Posted October 3, 2023 4 minutes ago, acantor said: There's an extra space after Shift + Right, which deselects the selected character, which means there's nothing to cut. Damn! And it took me an hour to NOT figure that out! Good catch. 1 Quote Link to comment Share on other sites More sharing options...
acantor Posted October 3, 2023 Report Share Posted October 3, 2023 I've inadvertently added an invisible character to "TEXT TYPE" more times than I'm comfortable admitting! Quote Link to comment Share on other sites More sharing options...
jsampsonyyyyy Posted October 3, 2023 Author Report Share Posted October 3, 2023 Wow! But many thanks for giving so much time to my problem. A very subtle trap. Quote Link to comment Share on other sites More sharing options...
acantor Posted October 3, 2023 Report Share Posted October 3, 2023 Quote I am trying to write a macro to make the first letter of the last word typed uppercase. In Word documents, Outlook messages that you're composing or responding to, and PowerPoint slides, you can capitalize the first letter of the most-recently typed word by pressing Shift + F3. No need to select the word. And no need for the cursor to be at the right boundary of the word -- the cursor can be on any letter of the word. Furthermore, pressing the hotkey does NOT change the position of the cursor. You may have to press Shift + F3 twice; the number of times depends on the initial capitalization state of the word when you start, e.g., "HELLO" vs. "hello". So although you may not need a macro to accomplish this, writing a macro might be more fun! PS: For this to work, the function keys on your keyboard must be mapped as function keys, not as media keys. If the function keys are mapped as media keys, you will need to add the Fn key: Fn + Shift + F3... but that requires too much finger gymnastics for my liking! 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.