Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

Space bar script?


  • Please log in to reply
2 replies to this topic
cankersoarlol
  • Guests
  • Last active:
  • Joined: --
All of this is so confusing to me, i tried to make a script but failed...

How would i make a script that pressed spacebar once every 3-4 mins.... until i turn it off?

it seems like it would be easy.

Thank you in advance

  • Guests
  • Last active:
  • Joined: --
It is, post the code you tried.

glucos
  • Members
  • 4 posts
  • Last active: Nov 19 2011 09:01 PM
  • Joined: 14 Nov 2011
here you go
;this script will press the space bar every four minutes when you press CTRL + SPACE until you press CTRL + Q
;or WIN + P or SHIFT + Q.
;copy this into a text file and save it as something.ahk with type=all files, then open it with autohotkey.exe

^Space::		;this is the space every four minutes hotkey
trigger=0
while trigger=0		;this is loops until trigger doesn't equal 0
{
send {space}
sleep 240000
}
return		;ends the hotkey

^q::trigger=1	;sets trigger=1 to end loop

#p::Pause		;pauses script

+q::ExitApp	;exits this script

if you want to see it do something, try this one
;this script will press the space bar every one second and send a msg when you press CTRL + SPACE until you press CTRL + Q
;or WIN + P or SHIFT + Q.
;copy this into a text file and save it as something.ahk with type=all files, then open it with autohotkey.exe

^Space::		;this is the space every second hotkey
trigger=0
while trigger=0		;this is loops until trigger doesn't equal 0
{
send {space}
MsgBox, "space"
sleep 1000
}
return		;ends the hotkey

^q::trigger=1	;sets trigger=1 to end loop

#p::Pause		;pauses script

+q::ExitApp	;exits this script