Need help with editing a script

Posts 1–10 of 10 · Page 1 of 1
Need help with editing a script
I can't seem to make this B-hopping script set to my mouse button 4 for jumping. I set my mouse4 to jump in csgo. But when I use the script below and hold my mouse 4 it doesn't keep jumping. Any suggestions, or fixes. Thank!




*space::
Loop
{
GetKeyState,state,space,P,XButton1
if state = U
break



Send{space},{XButton1}
Sleep,17
}
return

end::Exitapp

delete::Suspend
Code:
*XButton1::
Loop
{
GetKeyState,state,XButton1,P
if state = U
break



Send{XButton1}
Sleep,17
}
return

end::Exitapp

delete::Suspend
Probably something like that. I am sure @Ally can help you with this.
Quote Originally Posted by DarknzNet View Post
Code:
*XButton1::
Loop
{
GetKeyState,state,XButton1,P
if state = U
break



Send{XButton1}
Sleep,17
}
return

end::Exitapp

delete::Suspend
Probably something like that. I am sure @Ally can help you with this.

Thanks, I'm going to head off to bed really soon, but will try it first thing in the morning.
Code:
*XButton1::
   Loop
   {
      GetKeyState,state,XButton1,P
      if state = U
      break
      Send{XButton1}
      Sleep,17
   }
return

End::Exitapp
Del::Suspend
Yea that is correct what @DarknzNet did. Here you go i prettified your code @tealsack
END - Close Script
High beep - ON
Low beep - OFF
Delete - Toggle ON/OFF

EDIT - optimized it a little. yes you can optimized a simple bhop script...

Code:
hotkey, *xbutton1, off
BHOP=0


*delete::
hotkey, *xbutton1, toggle
BHOP+=1
if(BHOP>1)
{
BHOP=0
}
if(BHOP==0)
soundbeep 400
else
soundbeep 1000
    
*xbutton1::
while getkeystate("xbutton1","p")
{
sleep 1
send {space}
}
return                                                                                   


end::
exitapp
BHOP_mpgh.net.rar259 B · 5 downloads Clean
Quote Originally Posted by KyotoElmo View Post
END - Close Script
High beep - ON
Low beep - OFF
Delete - Toggle ON/OFF

EDIT - optimized it a little. yes you can optimized a simple bhop script...

Code:
hotkey, *xbutton1, off
BHOP=0


*delete::
hotkey, *xbutton1, toggle
BHOP+=1
if(BHOP>1)
{
BHOP=0
}
if(BHOP==0)
soundbeep 400
else
soundbeep 1000
    
*xbutton1::
while getkeystate("xbutton1","p")
{
sleep 1
send {space}
}
return                                                                                   


end::
exitapp
.approved .
Okay so I tried these and none of them work. Either my mouse4 can't understand holding, or maybe the problem is me? This is what I do.

>make AHK file
>paste your guys' code into it
>double click the file
>load up counter strike
>press and hold my mouse4 for jump
>nothing happens
>try pressing delete
>I hold mouse4 again
>nothing happens.



also DarknzNet When I tried your script it said

error at line 7
Line text send {Xbutton1}
this line does not contain a recognized action

so I tweaked it a bit to make the error go away and still got nothing.

Anyway thank a bunch guys If you happen to come up with anymore suggestion shoot them my way. Otherwise I got nothing.
Quote Originally Posted by tealsack View Post
Okay so I tried these and none of them work. Either my mouse4 can't understand holding, or maybe the problem is me? This is what I do.

>make AHK file
>paste your guys' code into it
>double click the file
>load up counter strike
>press and hold my mouse4 for jump
>nothing happens
>try pressing delete
>I hold mouse4 again
>nothing happens.



also DarknzNet When I tried your script it said

error at line 7
Line text send {Xbutton1}
this line does not contain a recognized action

so I tweaked it a bit to make the error go away and still got nothing.

Anyway thank a bunch guys If you happen to come up with anymore suggestion shoot them my way. Otherwise I got nothing.
Maybe try this
i edited the bhop script i use to fit your XButton1
F3 is the toggle but you can change that
Code:
F3:: Hotkey, *XButton1, Toggle
*~$XButton1::
Loop
{
GetKeyState,state,XButton1,P
if state = U
break

Send,{XButton1}
Sleep,0
}
return
Quote Originally Posted by Ally View Post


Maybe try this
i edited the bhop script i use to fit your XButton1
F3 is the toggle but you can change that
Code:
F3:: Hotkey, *XButton1, Toggle
*~$XButton1::
Loop
{
GetKeyState,state,XButton1,P
if state = U
break

Send,{XButton1}
Sleep,0
}
return
this worked thanks
Good to hear. Solved & Closed.
Posts 1–10 of 10 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us