Copy, paste and duplicate with one button.

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
BBomb007
Posts: 1
Joined: 18 Feb 2018, 01:47

Copy, paste and duplicate with one button.

18 Feb 2018, 02:18

:D Hey, I’m new to auto hotkey and I would like to get some help for some scripts for music production (and for people to modify them for their specific needs).

ps: My music software is Ableton 8-). If anyone has any scripts for Ableton let me know.

I’m trying to make a key do 3 things

1... when I click a button once it does one action...2 and when I hold it for a few secs it does another command
3... when I click it a second time it does another command.

What I’m trying to do is when I click a button once it will copy, and if I hold it down a few secounds it ’ll duplicate as long as I have it held down. And If I click the same button a second time it’ll paste.

But if I hold it down and have it do the duplicating I need it to reset so I can have the copy function first.

:thumbdown: this code does not work. please help.
I'm sure there is an easier way to code it

count = 1
a::
If count = 1
{
Send , ^c
count = 2
sleep, 3000
If GetKeyState("a")
count = 1
loop
{
sleep, 1000
If GetKeyState("a")
sendinput, ^d
}
Return
Else If count = 2
{
Send, ^v
count = 1
Return
}
Return
Last edited by BBomb007 on 18 Feb 2018, 23:08, edited 5 times in total.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: arrondark, RussF, ShatterCoder and 214 guests