Jump to content
Corsair Community

AutoHotkey "Hard Macro" macro tool for M60 and M90


Laufer

Recommended Posts

Hi to all,

What I want to do exactly is have 1 button that lowers the dpi while pressed like the sniper button and also does another function like zooming in.

Hi!

If you want to use it in some shooter I'm afraid its barely possible.

 

First of all Autohotkey can't send commands to a mouse directly (such as change DPI or Sniper button) - it can only intercept mouse command (move cursor or press key) and modify them a bit before sending to application.

 

Second - Autohotkey can slow down mouse movement in RTS or quest or other cursor moving application but that trick doesn't work in shooters - they read input directly from mouse. Thats why HardMacro don't work in some games (e.g. ArmA 2).

Link to comment
Share on other sites

  • Replies 155
  • Created
  • Last Reply
Hi!

If you want to use it in some shooter I'm afraid its barely possible.

 

First of all Autohotkey can't send commands to a mouse directly (such as change DPI or Sniper button) - it can only intercept mouse command (move cursor or press key) and modify them a bit before sending to application.

 

Second - Autohotkey can slow down mouse movement in RTS or quest or other cursor moving application but that trick doesn't work in shooters - they read input directly from mouse. Thats why HardMacro don't work in some games (e.g. ArmA 2).

 

Oh ok, that's a shame. =( Never mind, I just wanted to be able to lower the dpi at the same time as looking around in DayZ, due to the way the game works when free viewing or looking around it feels like my sensitivity is at 9000dpi. It's insanely hard to slow scan the horizon.

 

Thanks for your help and info.

Best regards

Link to comment
Share on other sites

HI everyone :) first of all, thank you so much for this amazing work!!

secondary... i'm deciding whether to buy the corsair m90 or a different mouse and this is my dilemma:

 

i need to build some macros for the programmable keys.... and i need them to work whether the game allows you or not :P so i DEFINITELY need the hardware playback... but at this point i'm wondering, how far can i go scripting those macros?

 

i'm basically concearned about this two macros(i play Ultima Online an amazing MMO :)):

healing macro:

control pixel on my life

if my life is < than X, send Fx on the click

if my life is < than Y, send Fy on the click

(to heal myself with bendages or potions, depending on how low my health is)

 

spell macro:

send Fx

wait x sexonds

block input on

wait x milliseconds

block input off

(cause in the game i play, after i push the spell button i need to stop running precisely when the spell's cast time finishes...so basically: i'm running keeping the right button of the mouse down, the macro should release my pressure automatically after some time despite me holding down the button... and then turn the block input off and allow me to run again)

 

this is pretty much it!

ah... and i'd like to know if i can send mouse clicks at locations with the scripts!

 

i know i can do this sort of things with ahk, but obviously it doesn't work with the game i'm on... so i wanna know if i can do this with the hardware playback

and your marvelous software :)

 

THANK YOU ALL SOSO MUCH FOR YOUR ATTENTION

and i hope to find this things fasible so i can but the mouse in NO TIME! :)

Link to comment
Share on other sites

Hi!

If you want make a bot (if its not permitted by rules of that game) - AHK have pretty nice PixelGetColor function. I'd recommend run that function by this SetTimer subroutine. Want send mouse click at screen location? Check this out. Blocking input? Sleep command must help.

But, I think your subject is way to far from topic :whip:

 

If you ask about possibility of emulating key pressings in your game - try it. Use HardMacro or make simple macro by yourself. In last case refer to this article.

Link to comment
Share on other sites

yeah, i'm kinda newbie with the whole scripting thing but i can work to get better with ahk :)

so basically you're telling me that all the macros i was talking about are actually potentially operable with the corsier m90 and your software, isn't it?

guaranteed to work with the hardware playback?(i mean it'll work, the game is so old and i know of other players using hardware macros too, )i mean, the block input stuff, controll pixel and even sending clicks at locations are operable to make macro scripts to load with the hardware playback?:D

if that is the case i'm buying it right now!!!

 

edit:BTW i don't want to make a bot, i'm still the one playin it i just want to simplify it a little :)

Link to comment
Share on other sites

yeah, i'm kinda newbie with the whole scripting thing but i can work to get better with ahk :)

so basically you're telling me that all the macros i've sayed are actually operable with the corsier m90 and your software right?

guaranteed to work with the hardware playback? all the block input stuff, controll pixel and even sending clicks at locations? :D

if thats the case i'll buy it today!

Nope. I was talking about abillities of AHK. Your bot doesn't depend on mouse)

Link to comment
Share on other sites

  • 2 months later...

Hello,

 

just bought a Corsair M95 and noticed that it is not possible to define a profile as a 'general' profile. When I have a profile "game xy" which is activated when starting game xy it is still active when exiting the game.

 

I came across this thread here and before diving into it I would just like to ask, if it is possible with "Hard Macro" to define a general profile.

 

Thanks for your help,

Alf

Link to comment
Share on other sites

Hello,

 

just bought a Corsair M95 and noticed that it is not possible to define a profile as a 'general' profile. When I have a profile "game xy" which is activated when starting game xy it is still active when exiting the game.

 

I came across this thread here and before diving into it I would just like to ask, if it is possible with "Hard Macro" to define a general profile.

 

Thanks for your help,

Alf

Hi!

Yes, you can make general profile. You have to create profile with empty "Application" field. Take a look at this post for example.

 

update: This is not exactly "general profile" that you might expect. Profile with empty "Application" will work in all applications that not assigned in other HardMacro profiles (also on Desktop).

Link to comment
Share on other sites

Hi Laufer,

 

thanks for your quick response!

 

Tried it and it works great. Improves the usability of the mouse immensely!

 

Two questions though:

 

1. When importing M90_Default.xml into the Corsair software, Buttons 7 and 8 are not assigned to F-keys but instead to Undo / Redo. So these buttons can't be programmed with Hard Macro, correct? Is there a workaround?

 

2. I'm an absolute newbie to AutoHotkey and programming but got everything working so far. One exception: I would like to assign a mouse button (e.g. button 9) with Ctrl (the control-key) and it should behave exactly like the key on the keyboard. This means I should be able to press the button, hold it for a time and release it. For example: In Google Chrome, pressing/holding button 9 and then pressing the left mouse button should open a link in a new tab. For some reason it doesn't work for me. Is there a solution?

 

Thanks again for your help!

Link to comment
Share on other sites

1. When importing M90_Default.xml into the Corsair software, Buttons 7 and 8 are not assigned to F-keys but instead to Undo / Redo. So these buttons can't be programmed with Hard Macro, correct? Is there a workaround?
I think there is - we need to reprogram M95 profile. Unfortunately, I don't have M95 and can't install driver (it demands mouse to be plugged in) so I ask you to send me default M95 profile (via dropbox or any suitable for you way). I'll try to see if I can adopt it to HardMacro. Will fly by instruments :sunglasse

 

2. I'm an absolute newbie to AutoHotkey and programming but got everything working so far. One exception: I would like to assign a mouse button (e.g. button 9) with Ctrl (the control-key) and it should behave exactly like the key on the keyboard. This means I should be able to press the button, hold it for a time and release it. For example: In Google Chrome, pressing/holding button 9 and then pressing the left mouse button should open a link in a new tab. For some reason it doesn't work for me. Is there a solution?
Yep. You can assign following script to desired mouse button:
; Ctrl key emulation
; Holding down Ctrl key while mouse button is  pressed
;
Ctrl:
  Send {SC01D down} ; press Ctrl
  Key := % A_ThisHotKey
  StringReplace, Key, Key, *$, , All
  while GetKeyState(Key, "P")
  {
  }
  Send {SC01D up}      ; release Ctrl
return

Just make sure that macro name same as in my example (Ctrl.ahk)

 

Thanks again for your help!

No problem! I do my best :biggrin:

Link to comment
Share on other sites

I think there is - we need to reprogram M95 profile. Unfortunately, I don't have M95 and can't install driver (it demands mouse to be plugged in) so I ask you to send me default M95 profile (via dropbox or any suitable for you way). I'll try to see if I can adopt it to HardMacro.

 

Great! You can download the profile at

http://we.tl/ujDBqbgVUb

 

Yep. You can assign following script to desired mouse button

 

I tried some things by myself, but ok, I see now that I couldn't possibly come up with that! ;-)

 

Again, thanks a LOT for your help!

Link to comment
Share on other sites

Great! You can download the profile at

http://we.tl/ujDBqbgVUb

Looks like M95 command codes for Forward and Backward differs from M90. They are not F-keys because Forward and Backward command can be intercepted by Autohotkey normally (XButton1 and XButton2 script key).

Solution:

1. Import into M95 mouse M90_profile (that is provided with HardMacro).

2. Change "Undo" to "Forward" and "Redo" to "Backward" manually using Corsair software. HardMacro will work then normally.

Please, test it and send me result profile - I want to know what codes used for Forward and Backward for M95.

 

I tried some things by myself, but ok, I see now that I couldn't possibly come up with that! ;-)

 

Again, thanks a LOT for your help!

You are welcome! :biggrin: Feel free to ask me any questions about scripting.

 

p.s. About script for Ctrl. Actually I just copied and replaced some code from this article. You can refer to it when make your own macros.

Link to comment
Share on other sites

Looks like M95 command codes for Forward and Backward differs from M90.

 

I did make a mistake. It was some kind of translation error (I use german version): Buttons 7 and 8 are not assigned to Undo / Redo but to Backward / Forward, so there is no difference between the M90 and M95 profile.

I thought the buttons did not work but it was just the script I assigned to them which didn't work.

Sorry for the trouble.

Link to comment
Share on other sites

I did make a mistake. It was some kind of translation error (I use german version): Buttons 7 and 8 are not assigned to Undo / Redo but to Backward / Forward, so there is no difference between the M90 and M95 profile.

I thought the buttons did not work but it was just the script I assigned to them which didn't work.

Sorry for the trouble.

Its Ok. I'm glad that where is no difference :biggrin:

Link to comment
Share on other sites

  • 2 weeks later...

@Laufer I am trying to set some keys on my m95 mouse like walk forward, side step left, etc. say I want F15 to be w and as long as it is pressed down I want. Normally I would use the keyboard but I recently broke my are so I cant play. And for some reason even though I used the program that came with the mouse but the programed buttons dont work in Battlefield 4 for some reason I have no issues playing othe games the way but bf4 is the only one I am trying to find another solution for. Currently I tried to use something from an older post but I got an error.

Please note I was just testing on a preset profile.

http://i.gyazo.com/5fa6dce76453289ea5d510f084a00e35.png

; Hold 4 while key is pressed

;

Press4:

Key := % A_ThisHotKey ; Use that construction to make macro universal.

StringReplace, Key, Key, *$, , All

Send {4 down} ; Push and hold 4

while GetKeyState(Key, "P")

{

}

Send {4 up}

return

I also tried but had the same error

; Hold 4 while M60 button 4 is pressed

;

Press4:

Send {4 down} ; Push and hold 4

while GetKeyState("F13", "P") ; while M60 button 4 is pressed

{

}

Send {4 up}

return

Link to comment
Share on other sites

Hi, FuzzyThor!

 

1) Unfortunately, some shooters don't work with Autohotkey, so this macro software may be useless (examples: DayZ, ArmA).

 

2) I see problem in your script: you have to change its name from PressW to walkforward (I guess it has file name walkforward.ahk). Script name must be same as script file name.

Link to comment
Share on other sites

  • 3 months later...
In what application you use whose buttons? Some games done work with Autohotkey (ARMA for example).

 

hi, it's a game called Mstar.

I just need to loop F5

I have tried to use the regular software, it seems like that game is not responsive (because the F5 works in browsers and other games)

so i thought i would try the hard macro...

Link to comment
Share on other sites

Try to test your script in other applications (for example in Windows Notepad) and test it with letters, so you will see if your script works.

 

Also show me your script or describe it in details. I'll try to help you.

Link to comment
Share on other sites

Try to test your script in other applications (for example in Windows Notepad) and test it with letters, so you will see if your script works.

 

Also show me your script or describe it in details. I'll try to help you.

 

Hi, I've actually just used the " 4. Toggle key press" example from the first page, because I want the exact same function except with F5 and a longer timer, and it doesn't seem to be activating.

 

I think I might be doing something wrong with the checking hardware playback, profile LED ... step. could you please explain the proper steps for that?

what i did was: imported M90_Default.xml, and then at the Assign Buttons page I chose M90_Default as the profile, and then checked hardware playback.

 

And also, I hope my intention of using the hard macro is right: with the corsair software i was able to run a F5 loop in web browsers (refresh), but when i switch into my game it does not respond. So i guess the game does not recognize the action with the software.

 

Thank you very much for the help!

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Archived

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


×
×
  • Create New...