I need a script

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
argau
Posts: 20
Joined: 21 Jul 2016, 15:05

I need a script

21 Jul 2016, 15:09

So if somebody would be nice and make me a simple script that holds a for like 0.4 seconds then holds d for 0.4 secs and keeps on spamming between a and d i'd be really happy. I myself don't know anything about scripting so yah. Thanks.
Helgef
Posts: 4709
Joined: 17 Jul 2016, 01:02
Contact:

Re: I need a script

21 Jul 2016, 15:20

Code: Select all

Loop
{
	Send,{a down}
	Sleep,400
	Send,{a up}{d down}
	Sleep,400
	Send,{d up}
}

#q::ExitApp ; Press Windows-key + q to quit script.
Guest

Re: I need a script

22 Jul 2016, 04:38

Thank you, this works but could you make a hotkey for it so that u could just press 1 or 2 keys to enable and disable it?
DeepMind
Posts: 271
Joined: 19 Jul 2016, 14:47

Re: I need a script

22 Jul 2016, 05:09

Guest wrote:Thank you, this works but could you make a hotkey for it so that u could just press 1 or 2 keys to enable and disable it?

Code: Select all

!e::Suspend ; Now your hot key is Alt+e but you can change it: !=Alt  /   ^=Ctrl   /  +=Shift  / or you could use any letter that would trigger that key on keyboard

Loop
{
	Send,{a down}
	Sleep,400
	Send,{a up}{d down}
	Sleep,400
	Send,{d up}
}

#q::ExitApp ; Press Windows-key + q to quit script.
And here is a list Symbols and Keys that you can use in this script or any other AHK scripts. HTH
Leaaaaaaaaaaaaaa

Re: I need a script

22 Jul 2016, 05:36

The script you made doesn't work for me?
Helgef
Posts: 4709
Joined: 17 Jul 2016, 01:02
Contact:

Re: I need a script

22 Jul 2016, 09:14

Code: Select all

stop:=1 							; Make sure this line is in the auto-exec part of your script, i.e., at the top.
#s::									; This hotkey is winkey+s, it will interupt the loop if it is running, and start it from the begining if it is not.
	stop:=!stop
	SetTimer,funnyLoop,-1
return

funnyLoop:
	if stop
		return
	Send,{a down}
	Sleep,400
	if stop
		return
	Send,{a up}{d down}
	Sleep,400
	if stop
		return
	Send,{d up}
	SetTimer,funnyLoop,-1
return

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: peter_ahk and 342 guests