Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

" Turbo " mode


  • Please log in to reply
21 replies to this topic
Meow
  • Guests
  • Last active:
  • Joined: --
Hello everyone !

I've been looking for a macro program that would enable me to have a " Turbo " mode on my mouse, as you sometimes see on special console pads.

In other words i would like my mouse to send several very fast clicks when i just hold the Right Mouse Button + some other key (say ctrl for instance).

I've tried two other macro programs but the macro i made wouldn't work ingame.

I thought it was gonna be easy to find and set up (thinking it must be quite popular) since some expensive gaming keyboards let you do this from their drivers, but in fact... not really.

I read in the FAQ that it is a side-effect of games that use DirectInput.
http://www.autohotke...s/FAQ.htm#games

However I am not familiar with scripting at all and therefore i find AutoHotKey very confusing, I really have no idea how to do this and it looks quite hard to learn to me (or maybe i'm just stupid).

Would anyone be so kind as to tell me how to make such a macro and how to get it to work in DirectInput games please ?

I hope my english makes sense (i tried my best !).

Thanks you very much in advance !

danalec
  • Members
  • 225 posts
  • Last active: Feb 23 2014 02:18 PM
  • Joined: 20 Jul 2006
Once Caps Lock is activated, LButton behaves as turbo clicking automatically while the button is pressed down.

This code was tested with many directinput games.
Change the sleep timings for custom perfomance.
*LButton::
loop
{     
	GetKeyState, LButtonState, LButton, P
	GetKeyState, CapsState, CapsLock, T
	if (LButtonState = "U") || (CapsState = "U") {
		break
	} else {
		send {click down}
		sleep, 10
		send {click up}
		sleep, 30
	}
}

oh yeah, i recommend (insert at begin of your script)
#NoEnv
#SingleInstance Force
SetTitleMatchMode 2
#Persistent
DetectHiddenWindows, On
sendMode Input
#InstallKeybdHook
#InstallMouseHook
SetDefaultMouseSpeed, 0
SetMouseDelay, -1
SetKeyDelay, -1
SetWinDelay, -1
SetBatchLines, -1
SetControlDelay -1
#MaxThreads 30
#MaxHotKeysPerInterval 1000
#MaxThreadsBuffer on
#KeyHistory 0

Enjoy ;)

Meow
  • Guests
  • Last active:
  • Joined: --
Thanks a lot, i changed " c " for " ! " and CapsLock for NumLock and it works a treat !

Sorry for I didn't read the other topics about this issue before posting by the way, i thouht i was looking for something very specific and only afterwards did i realise that many people had been asking about this. So i was expecting someone to tell me to check it out beforehand instead of helping me out.

Especially since the other scripts i found and tried wouldn't work ingame.

Thanks for your help again ! (and for making it clear what to do with the 2nd bit of code cause i would have no clue if you didn't tell me lol :wink: )

StreetRider
  • Members
  • 116 posts
  • Last active: Dec 11 2010 05:50 PM
  • Joined: 19 Mar 2008
Hello;

I modified your script just a little bit.

The way listed it would not allow you to do a single left click. It now does that. The only thing is that it will not allow me to drag a window.

Anyone know a quick fix around this.

#NoEnv
#SingleInstance Force
SetTitleMatchMode 2
#Persistent
DetectHiddenWindows, On
sendMode Input
#InstallKeybdHook
#InstallMouseHook
SetDefaultMouseSpeed, 0
SetMouseDelay, -1
SetKeyDelay, -1
SetWinDelay, -1
SetBatchLines, -1
SetControlDelay -1
#MaxThreads 30
#MaxHotKeysPerInterval 1000
#MaxThreadsBuffer on
#KeyHistory 0

*LButton::
loop
{     
   GetKeyState, LButtonState, LButton, P
   GetKeyState, CapsState, CapsLock, T
   if (LButtonState = "U") || (CapsState = "U")
{
	send {Click}
      break
} 
else 
	{
      send {click down}
      sleep, 10
      send {click up}
      sleep, 30
   	}
}

Thank you

Zippo()
  • Guests
  • Last active:
  • Joined: --

Hello;

I modified your script just a little bit.

The way listed it would not allow you to do a single left click. It now does that. The only thing is that it will not allow me to drag a window.

Anyone know a quick fix around this.

#NoEnv 
#SingleInstance Force 
SetTitleMatchMode 2 
#Persistent 
DetectHiddenWindows, On 
sendMode Input 
#InstallKeybdHook 
#InstallMouseHook 
SetDefaultMouseSpeed, 0 
SetMouseDelay, -1 
SetKeyDelay, -1 
SetWinDelay, -1 
SetBatchLines, -1 
SetControlDelay -1 
#MaxThreads 30 
#MaxHotKeysPerInterval 1000 
#MaxThreadsBuffer on 
#KeyHistory 0 

~*LButton:: 
loop 
{      
   GetKeyState, LButtonState, LButton, P 
   GetKeyState, CapsState, CapsLock, T 
   if (LButtonState = "U") || (CapsState = "U") 
{ 
  ; send {Click} 
      break 
} 
else 
   { 
      send {click down} 
      sleep, 10 
      send {click up} 
      sleep, 30 
      } 
}
Return

:D

StreetRider
  • Members
  • 116 posts
  • Last active: Dec 11 2010 05:50 PM
  • Joined: 19 Mar 2008
Still will not allow me to drag a window or an icon when it is not in turbo mode.

is there maybe a easier way that suspends the hot key unless cap locks is down. That way left click wil operate as normal the rest of the time.

Zippo()
  • Guests
  • Last active:
  • Joined: --
Try just this in an empty script and see if it works:
~*LButton::
Loop
{
	If !GetKeyState("Capslock", "T")
	  Break

	If !GetKeyState("LButton", "P")
	  Break

}
Return


StreetRider
  • Members
  • 116 posts
  • Last active: Dec 11 2010 05:50 PM
  • Joined: 19 Mar 2008
Almost there.

Now, I have it non stop clicking once it fires off. Makes quite a mess real quickly.


what I need...

Caps up + Left click= normal clicking of mouse.

caps down + Left Click = rapid clicking while left click down.

~*LButton::
Loop
{
   If !GetKeyState("Capslock", "T")
{
	MSGBOX, T
	Break
}
   If !GetKeyState("LButton", "P")
{
Loop
{
	If !GetKeyState("Lbutton", "P")
	Sleep, 30
	Send {click}
	sleep, 30
   
}
     Break
}
}
Return



Zippo()
  • Guests
  • Last active:
  • Joined: --
I wanted you to test the non-clicking script to see if you could drag windows while AHK was doing its thing. I had a mouse a while back that acted stupid if I even ran a script that checked the key state of a mouse button. Wanted to make sure you didn't have that problem.

Anyhow, run that other script without all the stuff at the top in a fresh script. Like so:
~*LButton:: 
loop 
{      
   GetKeyState, LButtonState, LButton, P 
   GetKeyState, CapsState, CapsLock, T 
   if (LButtonState = "U") || (CapsState = "U") 
{ 
  ; send {Click} 
      break 
} 
else 
   { 
     ; send {click down} 
     ; sleep, 10 
     ; send {click up} 
     ; sleep, 30
     Tooltip % A_TickCount
      } 
} 
Return

That is tested and works fine for me...

StreetRider
  • Members
  • 116 posts
  • Last active: Dec 11 2010 05:50 PM
  • Joined: 19 Mar 2008
Hello;

I did try it as directed.

Clicks and drags with caps up.

Clicks and drags with caps down with ticker growing.

The problem I see is that if it is pulsing the left click at all during the caps up state then I will not be able to click and drag a box around the units in SAGAonline.

It is not for a rapid fire, but when reassigning units to divisions I need to add and subtract sometimes 90 clicks or more.

Does this make sense?

Would it be easier to assign to the middle buttong the rapid clicking of the left button? Then it would only need to monitor that button state and would leave the functino of the left button alone.


Thank you for all of the help you have given so far.

StreetRider
  • Members
  • 116 posts
  • Last active: Dec 11 2010 05:50 PM
  • Joined: 19 Mar 2008
I tried it with the tooltip move into the other state as well, and it works good.

thank you.

I will readd the actual clicks and try it tonite.

StreetRider
  • Members
  • 116 posts
  • Last active: Dec 11 2010 05:50 PM
  • Joined: 19 Mar 2008
Hello;

I just wanted to post the finished code.


SendMode Play
~*LButton::
loop
{     
   GetKeyState, LButtonState, LButton, P
   GetKeyState, CapsState, CapsLock, T
   if (LButtonState = "U") || (CapsState = "U")
{
      break
}
else
   {
      send {click down}
      sleep, 10
      send {click up}
      sleep, 30
      }
}
Return


Thank you for the help.

danalec
  • Members
  • 225 posts
  • Last active: Feb 23 2014 02:18 PM
  • Joined: 20 Jul 2006
yeah basically just change sendmode input to play according to the game, maintaining the click timings.

note that if you set keyb and mouse hooks, sendmode input works flawlessy in 90% of games.

  • Guests
  • Last active:
  • Joined: --
STOP ASKING THIS QUESTION OMFG

Fenice
  • Guests
  • Last active:
  • Joined: --
this script doesn't works... i am unable to load it .