holding a key down? Topic is solved

Ask gaming related questions (AHK v1.1 and older)
Timecode

holding a key down?

01 Apr 2016, 04:24

Hey guys im still new to all this,

Was thinking to make a script that could just consistently hold down the F key instead of me writing for it to press f over and over/

Is this possible?
whattheFlex

Re: holding a key down?

01 Apr 2016, 04:58

#Persistent
^J::
Loop
{
f::{F DOWN}
g::{F UP}
}
Esc::ExitApp
Return

That was my guess but its wrong
User avatar
YoucefHam
Posts: 372
Joined: 24 Aug 2015, 12:56
Location: Algeria
Contact:

Re: holding a key down?

01 Apr 2016, 12:27

Hi try this:

Code: Select all


^J::
Loop
{
	Send, {F DOWN}
	Sleep, 40
	Send, {F UP}
}until !GetKeyState("J", "P")
Return

Esc::ExitApp
Return

:wave: There is always more than one way to solve a problem. ;)
Shadowpheonix
Posts: 1259
Joined: 16 Apr 2015, 09:41

Re: holding a key down?

04 Apr 2016, 11:20

The code YoucefHam posted will repeatedly press F for as long as J is held down. If you would prefer not to have to hold a key down, try this instead...

Code: Select all

#Persistent
#MaxThreadsPerHotkey 2
^J::    ; Ctrl+J to start & stop the repeating "F".
FToggle := !FToggle
While FToggle
{
    Send, {F Down}
    Sleep, 40
    Send, {F Up}
}
Return

Esc::ExitApp
shadowwikki

spam mouse  Topic is solved

09 Apr 2016, 02:43

hi im ah bigginer in hotckey can u give me script of spam click im using it in ragnarok
User avatar
YoucefHam
Posts: 372
Joined: 24 Aug 2015, 12:56
Location: Algeria
Contact:

Re: spam mouse

09 Apr 2016, 11:00

shadowwikki wrote:hi im ah bigginer in hotckey can u give me script of spam click im using it in ragnarok
This script will spam click while you are holding F5

Code: Select all

*F5::
Loop
{
	Click
	Sleep, 80
}until !GetKeyState("F5", "P")
return
:wave: There is always more than one way to solve a problem. ;)

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 69 guests