When Using the Send Command to Paste from the Clipboard, a Simple Best Practice Can Make the Difference
I’ve noticed that occasionally a couple of my Clipboard paste Hotkeys would cause a jump to the Bottom of the page in the WordPress editing window—a huge source of aggravation. Fortunately, I rarely used those Hotkeys. Then, while working on my blog for next week, I ran into the problem again in a simple capitalization Hotkey routine. This confused me since my standard uppercase, lowercase, and initial cap Hotkeys work just fine. The new Hotkey wasn’t that much different. I investigated.
It turns out that in the older working Hotkeys I sent the Clipboard variable to insert the text into the document:
while I used the Windows key combination Ctrl+V to paste the text in the newly created Hotkey:
If I used the first paste format with the variable Clipboard, it worked without a problem in WordPress. But, if I used the second Windows shortcut paste (Ctrl+V), it caused that maddening jump to the bottom in WordPress.
[Comment from Denis Lamarre: I suggest using “SendInput %Clipboard%” instead of “Send %Clipboard%”. It is generally faster and more reliable. In addition “SendInput” buffers any physical keyboard or mouse activity during the send, which prevents user keystrokes from being interspersed with those being sent.]
Note: Both forms worked fine in the other non-WordPress editors I tested.
I changed Send ^v to Send %Clipboard% in the new script and resolved the problem.
I now consider using Send %Clipboard% in place of Send ^v a best practice in AutoHotkey scripting.
Click the Follow button at the top of the sidebar on the right of this page for e-mail notification of new blogs. (If you’re reading this on a tablet or your phone, then you must scroll all the way to the end of the blog—pass any comments—to find the Follow button.)
This post was proofread by Grammarly
(Any other mistakes are all mine.)
(Full disclosure: If you sign up for a free Grammarly account, I get 20¢. I use the spelling/grammar checking service all the time, but, then again, I write a lot more than most people. I recommend Grammarly because it works and it’s free.)
Buy Jack a Cappuccino!
If you found a blog particularly useful, show your appreciation by buying Jack a cup of coffee! Or, if you prefer something for yourself, check out his books.
Find my books at ComputorEdge E-Books!