Need help making a combo script

Ask gaming related questions
zoudrix
Posts: 1
Joined: 25 May 2017, 12:47

Need help making a combo script

25 May 2017, 14:20

hello all i wanted to create a combo script that do the following
i wanted when i press middle mouse button it do:
-first it press ctr+g to toggle another program on once
-then while the mouse is held down it do a combo "v4f24f"
-when middle mouse button is released it instantly stop doing the combo "where i fail at"
-then it turn toggle the program off ctr+g

also i want it that if i press ctr+middle mouse it do another combo "t4t4t4"

here is the script i made which failed

Code: Select all

MButton::Combo_Function() 
^MButton::SBcombo_Function()


Combo_Function(){
	
	send ^g

	
	
	loop{
		
		GetKeyState,x,MButton
		if (x = "D"){
		
		break
	 }
			
			send 4
	        send f
	        send f
	        send v
	        send v
            send 2
	        send 4
	        send f
	        send f
	        send v
	        send v 
			
		
	
	 
	
	}
	
	send ^g
 return 
}


SBcombo_Function(){
loop{
send 4
send f
GetKeyState,y,g

if (y != "D"){
	break
}

}



}	
	

Esc::ExitApp
	
	
	




the code has lots of problems i just started coding today
one of the first thing i have encountered when i release the middle mouse button it still continue to send keystrokes of the combo also it does the 1st function combo even tho i press ctr+middle mouse thanks in advance
neomulemi6
Posts: 216
Joined: 30 Jun 2016, 06:01

Re: Need help making a combo script

26 May 2017, 01:22

Code: Select all

~MButton::
Send ^g
SetKeyDelay, 50, 50 ; So it doesn't send the keys too fast.  You may or may not need this.
While (GetKeyState("MButton", "P"))
{
	Send v4f24f
}
SetKeyDelay, -1 ; Reset key delay
Send ^g
Return

Return to “Gaming”

Who is online

Users browsing this forum: bidomo and 9 guests