Jump to content
Corsair Community

AutoHotkey "Hard Macro" macro tool for M60 and M90


Laufer

Recommended Posts

1) I need to see your script. It will help me help you :)

 

2) "Hardware Playback" should be checked.

 

3) Another way to test script in a game - try to type some letters in game's Chat window (replace F5 in your script with some letter). So you'll see if it works in game.

 

 

Hi, thanks for replying...

 

here is what i used:

; Press assigned button to toggle key "V" state
;
v_Toggle:
If ToggleFlag ; If variable contents are blank (by default) or 0, it is considered false. Otherwise, it is true.
{
	SetTimer, v_ToggleTimer, Off ; Turn off timer if button's been pressed second time
}
else
{
	SetTimer, v_ToggleTimer, 5000  ; Set timer to run every 75 milliseconds
}
ToggleFlag := not ToggleFlag    ; Invert variable (if it has true make it false and vice versa)
return

v_ToggleTimer:
Send {v down} ; Send key press
return

 

I replaced the keypress F5 to V here to test if letters work, but unfortunately it didn't work. (with hardware playback checked)

Link to comment
Share on other sites

  • Replies 155
  • Created
  • Last Reply
Looks like I have to register in Mstar and face problem by myself. It will take some time, but I'll give you answer anyway.

 

Hi, thanks for the help...

one quick question though,

on the manage profile page, when i press the dots under LED, a window comes up with numbers 1 to 6, and says select profile... do i have to do something with that?

Link to comment
Share on other sites

No, its just indicates profile with number of LED dots. It can't prevent you from using script in game. More information here (page 17)

 

Hi, thanks for the reply.

 

I see that you said: Leave Application field empty and profile will work in all applications that not assigned in other profiles (also on Desktop)

 

aside from not working in the game, mine doesn't even work on desktop, notepad, browser... anywhere. (when i test with letters)

is there a reason for that? maybe it's something with my mouse?

Link to comment
Share on other sites

Hmmm... Should work. Just tested. Maybe where is a mistake in setting mouse for usage with Hard Macro. Try to walk through all steps on first page.

 

And MStar doesn't want to update (( ... Never mind. Restart helped)

 

update:

Check all the HardMacro profiles. Where should be only one with empty "Application" field.

Link to comment
Share on other sites

Hmmm... Should work. Just tested. Maybe where is a mistake in setting mouse for usage with Hard Macro. Try to walk through all steps on first page.

 

And MStar doesn't want to update (( ... Never mind. Restart helped)

 

update:

Check all the HardMacro profiles. Where should be only one with empty "Application" field.

 

Hi,

 

I tried to follow all the steps again, and still nothing.

I created a new profile, and set the script i provided above to button 10 (i just chose a random one), saved, launch, and nothing was working.

 

I didn't assign an application because with Garena games, the .exe file in the game folder just opens the Garena messenger, which allows you to open the actual game from there, so i dont know which .exe is the actual game.

 

it seems like the buttons become unresponsive when i check hardware playback.

 

 

UPDATE: i think i finally figured it out... i went to click "save to m90" in the LED window after enabling hardware playback and it worked.

thanks a lot for your help.. (stupid me and not saving things)

Link to comment
Share on other sites

  • 2 weeks later...
Is there any chance of getting this to work with the Vengeance M65?

Hi Brokenpwn!

As far as I know M65 works same way as M60 but I still had no chance to check it out. Please, let me know if you'll have any success with it.

Link to comment
Share on other sites

Hi Brokenpwn!

As far as I know M65 works same way as M60 but I still had no chance to check it out. Please, let me know if you'll have any success with it.

 

Hey, thanks for responding. I realized I had the wrong version of AHK and it works now =)

Link to comment
Share on other sites

  • 2 weeks later...

Can someone please tell me how to assign F13,F14,F15 keys ? I have a merc stealth keyboard with M60 mouse .. HardMacro dloaded .. cannot get those mouse buttons to assign pressing shift F13, cntl shift F13 .. no luck at all. I asked corsair if I could assign W to mouse to walk in games and response was mouse is not designed to do this.

 

Win 8.1 pro 64 bit

Asus Maximus Hero 6 mobo

I7 4770K

32 gb Trident ram

Samsung 840 pro ssd

Link to comment
Share on other sites

  • 4 weeks later...

Hi, I am trying to create a toggle button on my mouse to toggle the function of another button on my mouse. I think I know the gist of what needs to be written, I am just not sure exactly how to write it as I am new to macro coding.

 

I have an M90 and I would like to make button 14 toggle the function of button 1 (left click) between its regular single click function and a repeat function to be used as rapid fire in some games. I would imagine all of this would take place on button 14 if it is possible basically it would toggle the function of button one between:

 

LMB_Intermittent:

while GetKeyState("LButton", "P")

{

Send {LButton down}

Sleep, 10

Send {LButton up}

Sleep, 10

}

return

 

and

 

LMB_PressOnce:

Send {LButton down}

Sleep, 10

Send {LButton up}

return

 

I hope I am somewhat on the right track, any help would be greatly appreciated!

Link to comment
Share on other sites

  • 3 months later...

---------------------------

HardMacro_M60.ahk

---------------------------

Error: Call to nonexistent function.

 

Specifically: Object()

 

Line#

008: SendMode,Input

009: SetWorkingDir,%A_ScriptDir%

013: Device := "M60"

014: Profiles := "Profiles.cfg"

015: Config := "HardMacro.cfg"

---> 016: aMacroList := Object()

017: aProfileList := Object()

018: Version := ReadConfig("Version", "VersionInfo")

021: FileRead,sMouseOver,*c Sounds\MouseOver.wav

022: FileRead,sClick,*c Sounds\Click.wav

023: FileRead,sProfileSwitch,*c Sounds\ProfileSwitch.wav

025: Gosub,ReadMacroList

026: Gosub,ReadProfileList

 

The program will exit.

---------------------------

OK

---------------------------

 

 

I can not open the Hardmacro_M60.ahk of the hardmacro, what's this?:confused:

Link to comment
Share on other sites

  • 1 month later...

Hello, I only made myself an account on the forum for this problem.

 

I recently bought an M65 and found it lacked the mouse button macro feature.

Pretty much all the places I looked for a solution to this led me to this page. I have installed and setup AHK and the HardMacro pack. However I'd only like a macro for button 6; I'd like to have it so as long as you hold it down it spams left mouse button. I'd like to leave buttons 4, 5 and 8 how they are, as DPI changers.

 

This seems impossible to me, please help!

Link to comment
Share on other sites

Hey, guys!

Something happened and e-mail notifications gone. Now I'm back and will try to help you all.

--------------------------------------

 

Hello, IncognitoToe!

 

So, you don't need to reassign buttons at all. You just need to create new macro by pressing on "pencil button". Copy following text and press "Launch" button. Read all article for more information.

 

; Hold Mouse Button for LMB spam
LMB_Spam:
Key := % A_ThisHotKey 			; check if this hot key still pressed
StringReplace, Key, Key, *$, , All
while GetKeyState(Key, "P") 		; while hot key pressed do... 
{
	Send {LButton down} 		; press LMB
	Sleep, 50 			; wait 50 ms
	Send {LButton up} 		; release LMB
	Sleep, 50 			; wait 50 ms
}
return

Link to comment
Share on other sites

I have an M90 and I would like to make button 14 toggle the function of button 1 (left click) between its regular single click function and a repeat function to be used as rapid fire in some games.

 

This problem could be solved in two ways:

1) Create one profile for each game and assign specific macro for those games. For first make rapid fire, for second - just LMB click (or leave it blank).

2) As you wanted - a toggle button. You can assign new variable in your script and toggle it by your 14th button. This method have one minus - you must remember if your rapid fire mode on or off. Sometimes it can be annoying. But if you interested - let me know - I will help you with the programming.

Link to comment
Share on other sites

Hi I tried this and it didn't work... just to be clear I only want the LMB spammer for mouse button 7 on my M65.

Its hard to help when answer is "it didn't work". I need to know what did you tried, what points of instructions worked well and where did you stopped. More information you give - easier for me to give you right directions.

Link to comment
Share on other sites

Its hard to help when answer is "it didn't work". I need to know what did you tried, what points of instructions worked well and where did you stopped. More information you give - easier for me to give you right directions.

 

Right, sorry I was vague. I did exactly what you told me to do, added a macro with the pencil tool, copied the code in, saved and clicked launch, switched to CSGO and tried using button 7, did not even perform LMB, not even on one click or click and hold.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...