Holding Down a Key and Scrolling to Repeat a Funtion

Get help with using AutoHotkey and its commands and hotkeys
cyruspk
Posts: 1
Joined: 22 Jul 2018, 00:02

Holding Down a Key and Scrolling to Repeat a Funtion

Post by cyruspk » 22 Jul 2018, 00:24

Hi Folks,

I'm trying to write a script for copying a number to the clipboard with a key and add certain amount to it with each scroll jump and past it back again with the same scroll but I'm having a little trouble getting in to work like I want to. Here is on of the things that I tried. Does anybody have any ideas on that?

f2::
Send, {CTRLDOWN}c{CTRLUP}
sleep, 100

WheelDown::
Var1:=100
Var2:=10
If GetKeyState ("f2","P")
Clipboard:=Var1+Var2
Send, {CTRLDOWN}v{CTRLUP}
return
MidnightAcro

Re: Holding Down a Key and Scrolling to Repeat a Funtion

Post by MidnightAcro » 28 Jul 2018, 00:38

send the new number to var1

to simulate... Var1=Var1+Var2
;)
Post Reply

Return to “Ask For Help”