One Button Paste from Windows Clipboard

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
TrevorMatthews
Posts: 4
Joined: 10 Dec 2023, 14:39

One Button Paste from Windows Clipboard

Post by TrevorMatthews » 10 Dec 2023, 14:49

Hi all
I have attempted to search the forum for this but didn't find much.

I have some USB Dymo M10 postal scales.
I have code running that copies the weight continuously to the Windows 10 clipboard.

I know I can use Control + v to paste the weight in to Royal Mail Click & Drop system.

But it will speed things up if I can use a single key to call the paste function.

Can AutoHotkey solve this problem?

regards
Trevor

User avatar
andymbody
Posts: 951
Joined: 02 Jul 2017, 23:47

Re: One Button Paste from Windows Clipboard

Post by andymbody » 10 Dec 2023, 15:35

In general, yes, but there are trade-offs. This uses the "F7" key (you can choose any key you like). But you will usually loose the normal functionality of the chosen key in the process. The modifier keys are included in shortcuts to prevent this problem. The F7 is probably a safe key (not often used), but may also be inconvenient to press (physically). Choose a key that is physically convenient but not frequently used for other purposes. This balance can prove to be challenging.

Code: Select all

#Requires autohotkey v2.0
#SingleInstance force
return
F7::Send("^v")	; change the key to what you want

TrevorMatthews
Posts: 4
Joined: 10 Dec 2023, 14:39

Re: One Button Paste from Windows Clipboard

Post by TrevorMatthews » 10 Dec 2023, 15:37

Hi
Thank you very much.
I have also just found a 2 button cut and paste keyboard on Amazon for £8

TrevorMatthews
Posts: 4
Joined: 10 Dec 2023, 14:39

Re: One Button Paste from Windows Clipboard

Post by TrevorMatthews » 10 Dec 2023, 15:50

Hi
And how do I cancel that and go back to the default if required?

regards
Trevor

TrevorMatthews
Posts: 4
Joined: 10 Dec 2023, 14:39

Re: One Button Paste from Windows Clipboard

Post by TrevorMatthews » 10 Dec 2023, 15:54

Hi
Cancel that, just changing the key I want stops the F7 button from doing it.

Post Reply

Return to “Ask for Help (v2)”