What's the scrpt for the spacebar like when u hold it in game u just keep on jumping and jumping??
space bar script
Started by
geromepogi123
, Nov 13 2012 06:04 AM
13 replies to this topic
#1
-
Posted 13 November 2012 - 06:04 AM
There's a gaming subforum for this topic.
As it is you aren't that specific. Do you want it to send space repeatedly when you hold down space (or another key)? Do you want it to just hold down space with no user input? Something else entirely?
As it is you aren't that specific. Do you want it to send space repeatedly when you hold down space (or another key)? Do you want it to just hold down space with no user input? Something else entirely?
#2
-
Posted 13 November 2012 - 06:49 AM
Join us at the new forum - http://www.ahkscript.org/
hello, try this:
#Persistent Toggle = 1 $Space:: if (Toggle = 1) { Toggle = 0 send, {Space down} } else { Toggle = 1 send, {Space up} } return
#3
-
Posted 13 November 2012 - 07:00 AM
Khalid's script simulates holding the space key down by taping it once, and releasing it when you tap it again. If that is not what you are looking for here are two other options.
This script will simulate hitting the space key repeatedly when you tap it once, and stops when you tap it again:
This script will simulate hitting the space key repeatedly when you tap it once, and stops when you tap it again:
#maxthreadsperhotkey 2 ;*1 $space:: ;2 { toggle:=!toggle ;*3 while, toggle ;*4 { send, {space} ;*5 sleep, 500 ;*6 } } return ;*7 end::exitapp ;*8 /* 1 Allows the hotkey to interrupt itself. This is needed for the toggle switch effect. 2 Space bar hotkey. 3 Declares a variable named "toggle", and uses the logical not "!" to set the variable to be NOT what it was before this line. Creates a toggle switch ON OFF effect. 4 A while loop. Checks the toggle variable and only runs the loop if it evaluates to TRUE. 5 This can be whatever code you want run repeatedly. In this case it sends a single space. 6 This sleep command sets a 500 ms (one half second) pause between loops. 7 Designates the end of the auto-execute section for the script. 8 An emergency shutoff hotkey. A good idea in case you need to stop a script fast. */And this will simulate hitting space repeatedly as long as space is held down:
#usehook ;*1 hotkey, space, spam ;*2 return spam: ;*3 { while getkeystate(a_thishotkey, "p") ;*4 { sleep, 500 ;*5 sendinput, {%a_thishotkey%} ;*6 } } return end::exitapp ;*7 /* 1 Directs subsequent hotkeys to use the keyboard hook. 2 Uses Hotkey Command to create a down button hotkey tied to the spam subroutine. 3 Spam subroutine label. When called, any code below it will run. 4 While loop and getkeystate, will loop as long as the originating hotkey is held. 5 50ms sleep between loops. 6 Each loop run sends whichever hotkey originated the subroutine. 7 Emergency shutdown. */
#4
-
Posted 13 November 2012 - 07:24 AM
"My dear Mr Gyrth, I am never more serious than when I am joking."
~Albert Campion
-----------------------------------------------------------------------------------------------
Website | Demo scripts | Blog | External contact
~Albert Campion
-----------------------------------------------------------------------------------------------
Website | Demo scripts | Blog | External contact
Unm I'm saying is that in a game u have to press and press the spacebar to jump but I want it when u only hold the spacebar and u keep on jumping and jumping.
#5
-
Posted 13 November 2012 - 04:14 PM
do i copy the hole thing cuz i dont know where to end the script at . where does t ends??.
#8
-
Posted 14 November 2012 - 05:58 AM
yes, copy the whole script, in fact every thing between "/*" and "*/" is just comments, so if you copy it or no the script should function properly.
#9
-
Posted 14 November 2012 - 06:42 AM
ts not workng like when i hold the spacebar its not jumpng and jumping:(
#10
-
Posted 15 November 2012 - 01:39 AM
Try this:
#Persistent $Space:: send, {Space} sleep, 200 return
#11
-
Posted 15 November 2012 - 10:48 PM
dmg's 2nd script and my last one are working perfectly for "TES: Skyrim", may i know the game that you are trying to apply the script for?
#13
-
Posted 16 November 2012 - 02:32 AM
Battlefield play4free when like I run the scripts it stop jumping like the spacebar stop working. Last time my brother did something to it like when u hold it it keeps jumping now I think it stop working and my brother forgot how he did it.
#14
-
Posted 19 November 2012 - 06:08 AM