Jump to content

Auto Hotkey Help For Macro Users.


35 replies to this topic

#21 Wintersdark

    Member

  • PipPipPipPipPipPipPipPipPipPipPip
  • 13,375 posts
  • Google+: Link
  • Twitter: Link
  • LocationCalgary, AB

Posted 03 June 2013 - 08:00 AM

View PostKoniving, on 03 June 2013 - 07:54 AM, said:

I don't know. Mine runs extremely well with changes made inside a match. If you find me powered down in a match but I haven't fired a shot, the reason why is I'm fixing my macro as I change it every time I change a mech.

You could set a key to toggle macro modes.

Do it like Mr. Friday said above, with the CHATTING variable. Use, say, function keys to set an ACMODE variable, then if ACMODE=1 or ACMODE=2 etc to choose which bit of script to execute when your key is pressed.

Something like this:
Spoiler


Sadly, the forum ate my indentations when I copied and pasted from Notepad++, so they could be sketchy here.

Also, just a heads up unrelated to the above but correcting something erroneous I said earlier - the P the GetKeyState is telling AHK to check the physical state of the key, as opposed to the logical state which in some cases may differ. The other option here is to check T, for toggle, so you can tell if, say, Capslock is on or off instead of whether or not the Capslock key is held down or not.

Edited by Wintersdark, 03 June 2013 - 10:45 AM.


#22 Wintersdark

    Member

  • PipPipPipPipPipPipPipPipPipPipPip
  • 13,375 posts
  • Google+: Link
  • Twitter: Link
  • LocationCalgary, AB

Posted 03 June 2013 - 08:39 AM

For even more awesomeness, if you know someone who sounds even vaguely like Betty, read this:

http://www.autohotke...s/SoundPlay.htm

You could have the mode select hotkeys (f1, f2, etc) play a wav file of Betty announcing which AC mode you've selected... Maybe change it from a key per mode to using the mouse wheel to select modes... *ponders*

#23 Mr Friday

    Member

  • PipPipPip
  • Bad Company
  • Bad Company
  • 63 posts
  • LocationYorkshire, England

Posted 03 June 2013 - 10:55 AM

View PostDireBloodWolf, on 02 June 2013 - 05:02 PM, said:

I'm trying to get autohotkey to work for mapping the scroll wheel, and it is just not working. can someone tell me what i'm doing wrong:

Spoiler


It works in notepad but not in MWO.


Got to say, I haven't tried mapping things to mouse buttons thats much, so it could just be that CryEngine doesn't like it that much... Also you could try adding delays to the keys to ensure that CryEngine catches them, the script might be releasing the keys before the game can register them as pressed at all. Something like this:

send {z down}
sleep 60
send {z up}


or with SetKeyDelay perhaps.

Also I know its possible to bind the mouse without a 3rd party program like AHK in the middle. It would require you to be able to rebind the left and right mouse wheel buttons to Mouse 4 / 5 or even the keys themselves. That would allow the left and right to detected by MWO easily.

As for mouse wheel up / down you have to get a bit naughty and edit the actionmaps.xml. A bad thing to do 'cause they don't like us editing xml files anymore. A good thing to do 'cause MWO doesn't play nice with the mouse wheel any other way. Just add these lines into the actionmaps file:

<action name="m_toggle_zoom_mode">   <rebind device="keyboard" input="mwheel_up" index="1" defaultInput="mouse3"/>   </action>
<action name="m_toggle_4x_zoom_mode">   <rebind device="keyboard" input="mwheel_down" index="1" defaultInput=""/>   </action>


View PostWintersdark, on 02 June 2013 - 05:05 PM, said:

Hawt. Probably the title match mode there that fixes it. I'd originally used Mechwarrior Online with the window title, but it was very inconsistent - would work sometimes, and not others, so I just went to window class (as I'm not playing other CryEngine games) which has worked quite a bit better for me.

Why detecthiddenwindows?

Also, having T or Y toggle a chat variable is pretty clever, I hadn't even considered it. Would remove the necessity to tap backspace very quickly to toggle chainfire without double-toggling it :)


I tend to include detecthiddenwindows in most scripts where I need to check or manipulate windows. Had loads of problems with a program that wouldn't work without it before so I just include it in most scripts now.

#24 Wintersdark

    Member

  • PipPipPipPipPipPipPipPipPipPipPip
  • 13,375 posts
  • Google+: Link
  • Twitter: Link
  • LocationCalgary, AB

Posted 03 June 2013 - 11:14 AM

I've been playing with the mode select above, but using F1 through F3 to select timing on my -DD's 5 AC/2's - 100, 125 and 150ms delays between each of the 5 AC/2's, to get awesome dakkadakka with more controllable heat buildup. At 150ms, you're outputting less DPS of course, but you can sustain it for a good long time. Excellent for suppressive fire. It's surprising what a slight additional delay can do for heat buildup.

Also, you can use CTRL for the 150ms recycle, and always have the option of just holding down Left Mouse (if you've got all the AC/2's in a single group for it) to switch to max-dps fire too.

Edited by Wintersdark, 03 June 2013 - 11:35 AM.


#25 Koniving

    Welcoming Committee

  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • The Guide
  • The Guide
  • 23,384 posts

Posted 03 June 2013 - 11:25 AM

View PostWintersdark, on 03 June 2013 - 08:39 AM, said:

For even more awesomeness, if you know someone who sounds even vaguely like Betty, read this:

http://www.autohotke...s/SoundPlay.htm

You could have the mode select hotkeys (f1, f2, etc) play a wav file of Betty announcing which AC mode you've selected... Maybe change it from a key per mode to using the mouse wheel to select modes... *ponders*


Actually I have someone working on replacing Betty's voice, but in the meantime will swap Betty's voice with MW3's computer soon for a change in pace.
Example:


#26 WVAnonymous

    Member

  • PipPipPipPipPipPipPipPip
  • Wrath
  • Wrath
  • 1,691 posts
  • LocationEvery world has a South Bay. That's where I am.

Posted 03 June 2013 - 11:46 AM

View Postzraven7, on 03 June 2013 - 08:00 AM, said:

Dude, Kon is one of the most helpful members of the community here. He's really not a troll.


Although he may live in the northern Lower Peninsula of Michigan, which is where the trolls live. :D

But he's a good guy, nonetheless. :)

#27 Koniving

    Welcoming Committee

  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • The Guide
  • The Guide
  • 23,384 posts

Posted 03 June 2013 - 12:52 PM

I think Jazz was referring to Dark at first, who said he knew how to make chat macros but initially gave nothing on how to allocate the macro to a button.

Also, I actually live in Florida. Where's too humid even when its cool.

#28 DireBloodWolf

    Rookie

  • Bridesmaid
  • 5 posts

Posted 03 June 2013 - 02:27 PM

View PostWintersdark, on 03 June 2013 - 07:26 AM, said:

Yeah, even without those lines, AHK is very inconsistent for me in MWO. Works fine in everything else, but in MWO... It's unreliable. Quite frustrating, really - I suspect Windows 8 has a role in my troubles (because it often does) but I've been unable to reliably reproduce the problems. It *always* works in everything else, and just sometimes works in MWO... but it seems almost random. Frustrating.


I'm running Windows 7 and I'm running AHK in admin mode... it still won't work after starting fresh... what the heck?

#29 DireBloodWolf

    Rookie

  • Bridesmaid
  • 5 posts

Posted 03 June 2013 - 03:18 PM

View PostMr Friday, on 03 June 2013 - 10:55 AM, said:


Got to say, I haven't tried mapping things to mouse buttons thats much, so it could just be that CryEngine doesn't like it that much... Also you could try adding delays to the keys to ensure that CryEngine catches them, the script might be releasing the keys before the game can register them as pressed at all. Something like this:

send {z down}
sleep 60
send {z up}



Just saw this. That fixed it. Thanks!

#30 Wintersdark

    Member

  • PipPipPipPipPipPipPipPipPipPipPip
  • 13,375 posts
  • Google+: Link
  • Twitter: Link
  • LocationCalgary, AB

Posted 04 June 2013 - 09:50 AM

My current Jag Autocannon Fire Select and general MWO utility script:

Spoiler


Fire modes 1 and 2 staggerfire my AC/2's when I'm rocking my 5AC2 Jag, at high DPS/high heat and moderate DPS/moderate heat timings. I've found firing them somewhat slower is fantastic for times when I'm firing at long range, and am aiming more for suppression than outright damage.

Fire mode 3 is for my 2AC5/2AC2 mode. It causes a cannon to fire every quarter-second, maximizing the AC5 output but skipping a couple potential shots with the 2's. I group fire the lot of them for high DPS/single strike damage, but chain fired like this they output steady, even dakka and will take *forever* to overheat, even with only the in-engine 10 DHS.

I've stolen Mr. Friday's context sensitive quickfire backspace implementation as well, so I can finally backspace properly in chat, too.

It's working marvelously.


Oh, and I found the source of my woes. See, what I was doing previously is closing AHK and relaunching it when I changed my script. This lead to really inconsistent behaviour with the mouse/keyboard hooking and cryengine - now, just having the existing AHK instance reload the script when I change it has stopped the problem entirely.

PEBKAC, as always.

Edited by Wintersdark, 04 June 2013 - 09:52 AM.


#31 Mr Friday

    Member

  • PipPipPip
  • Bad Company
  • Bad Company
  • 63 posts
  • LocationYorkshire, England

Posted 04 June 2013 - 12:22 PM

Winter, you could make your ACMODE macro thingy simpler by doing this:

Spoiler


#32 Gyric

    Member

  • PipPipPip
  • Legendary Founder
  • Legendary Founder
  • 97 posts
  • LocationHamburg

Posted 22 June 2013 - 10:17 AM

hmm well, i want to know how i can send text messages on purpose

such things as "HF, GL & Bacon!", perhaps predefined team/lance commands and so on...
i read this thread and tried several things, but nothing has worked

#33 Mr Friday

    Member

  • PipPipPip
  • Bad Company
  • Bad Company
  • 63 posts
  • LocationYorkshire, England

Posted 22 June 2013 - 11:00 AM

I ended up using this to chat in MWO:

; Install the keyboard hook to circumvent CryEngine
#InstallKeybdHook

; The virtual keypress delays
SetKeyDelay, 0, 0
 
; Set the message to be sent
Message = HF, GL & Bacon!
 
; Send the message
Send {RAW}%Message%


Those should allow you to send key presses to the chat box.

If you don't mind not creating your own I made one that easy to edit as all you needed to do was add variables according to its naming convention, like so:

Spoiler


#34 Wintersdark

    Member

  • PipPipPipPipPipPipPipPipPipPipPip
  • 13,375 posts
  • Google+: Link
  • Twitter: Link
  • LocationCalgary, AB

Posted 22 June 2013 - 11:15 AM

View PostMr Friday, on 04 June 2013 - 12:22 PM, said:

Winter, you could make your ACMODE macro thingy simpler by doing this:

Spoiler



Not really, because the various mode options change all the time with my builds. I use about 15 mechs primarily, and even then I change their builds frequently. I don't just use them for timings - some are for entirely different weapon sets such as chain firing a pair or trio of UAC5's without jamming, etc. I started out with a variety of 5AC2 timings to experiment, but only use one now (125ms; I groupfire for full dps).

Thus, I can change between fire modes relevant for my current mech/build on a button press.

View PostMr Friday, on 22 June 2013 - 11:00 AM, said:

I ended up using this to chat in MWO:

; Install the keyboard hook to circumvent CryEngine
#InstallKeybdHook
 
; The virtual keypress delays
SetKeyDelay, 0, 0
 
; Set the message to be sent
Message = HF, GL & Bacon!
 
; Send the message
Send {RAW}%Message%


Those should allow you to send key presses to the chat box.

If you don't mind not creating your own I made one that easy to edit as all you needed to do was add variables according to its naming convention, like so:

Spoiler



What role does the menu play? Why not just V, F? Or do you have other functionality (V, <something else> <something else>)?

#35 Mr Friday

    Member

  • PipPipPip
  • Bad Company
  • Bad Company
  • 63 posts
  • LocationYorkshire, England

Posted 22 June 2013 - 03:07 PM

The key 'V' was chosen simply to start the VGS system as it steals all keypresses. While entering the VGS macro you can't control your mech.

And yes there are other menus. The current list is this:

Spoiler


Its definitely too much, but I tend to use TS most of the time, so it was more of a curiosity then anything I tried to get really simple. The system works, but the command list needs some.

Edited by Mr Friday, 22 June 2013 - 03:09 PM.


#36 Koniving

    Welcoming Committee

  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • The Guide
  • The Guide
  • 23,384 posts

Posted 24 July 2013 - 12:13 AM

View PostKoniving, on 01 June 2013 - 11:20 AM, said:

Actually figured it out! Thank you.

Both of these use Left CTRL, which is also mouse button under my ring finger.
I use this for the LB10, MG, AC/2 Jager. It's set to fire the AC/2s in groups 3, 4, and 5. My Shotgun fires on group 1, and the MGs are in the comfortable to hold group 2.

Spoiler



Finally got around to vids using this macro.









1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users