

Constant Fire For Tag
#21
Posted 15 January 2013 - 12:56 PM
See the AutohotKey Key List.
Hmm, actually, letters arent in there, that list just lists special keys etc.
a-z work fine for the alphabet keys though
#22
Posted 15 January 2013 - 01:00 PM
In MWO, it does not properly recognise keys mapped to fire weapons.
So
Send {1}
does not work - it needs a delay between the key down and key up. Instead, use:
Send {1 down}
Sleep, 50
Send {1 up}
However, as this script is for HOLDING DOWN a button, this may not be needed.
I just realised - why am I being an ***** and binding it to MButton?
I should just have it send a number, then it simplifies it down a bunch - I can easily tell my mouse to send 6 instead of MButton for that button.
#23
Posted 15 January 2013 - 01:09 PM
Final script:
TAGMode = 0 ; If TAG Mode was toggled on in game, then the game quit before we turned it off, ; Make Wheeldown turn off TAG mode even outside the game #IfWinNotActive, ahk_class CryENGINE ~Wheeldown:: if (TAGMode ==1){ Send {5 up} SetScrollLockState, Off TAGMode = 0 } Return #IfWinNotActive #IfWinActive, ahk_class CryENGINE ; Wheel Up is normal zoom Wheelup:: Send {z} Return ;TAG Toggle Wheeldown:: if (TAGMode == 0){ Send {5 down} SetScrollLockState, On TAGMode = 1 } else { Send {5 up} SetScrollLockState, Off TAGMode = 0 } #IfWinActive
Forgot to change the part that disables TAG when MWO is not the active window.
Do you see any mistakes?
Edited by GODzillaGSPB, 15 January 2013 - 01:27 PM.
#24
Posted 15 January 2013 - 03:48 PM
http://evilc.com/fil...o/tagtoggle.ahk
New features:
Now ripped the zoom code out of the TAG toggle script so you can pick and choose what you do and dont want more easily.
If TAG is on when the scoreboard or map opens in MWO, it is turned off
-So this script compensates for that by disabling TAG while you hold Tab for scoreboard...
-And when you hit B for map, it disables TAG, then when you hit B again to close the map, it re-enables TAG
So now the macro hits 6 for TAG. You should be able to leave the macro to be holding down 6, but use another key (ie wheeldown) to trigger the macro - look in the code and it should be apparent which is which.
I have left the default trigger button to also be 6 - in my mouse software, I just set the button on my mouse I want to use to send 6.
Edited by evilC, 15 January 2013 - 03:50 PM.
#25
Posted 15 January 2013 - 05:33 PM
OK, new version up, same link: http://evilc.com/fil...o/tagtoggle.ahk
Now, when you run it, you get a GUI. Select the weapon group that contains TAG from the drop-down box. This is saved in a settings file, so if it doesnt change, you only need to do it once.
I went back to Middle Button to trigger TAG because separating the button used to trigger the toggle and the button that actually fires TAG makes it easier to distinguish between the two, less chance of people editing the wrong bit.
#26
Posted 16 January 2013 - 01:51 AM
With the new complexity of the script, editing it manually could be a bit more tricky, couldn't it?
For now I will continue to use your older. modified script as it works good enough and uses wheeldown for TAG.

#27
Posted 16 January 2013 - 03:08 AM
This would be solvable with a bunch of radio and dropdowns (eg radio to select mouse, dropdown with mouse buttons 1-5, plus a radio for joystick, with two dropdowns - one for joystick number and one for button number) but then it starts to get really complicated.
Also, as you say, I am probably going a bit above and beyond the call of duty as-is, so I think it is best to leave it up to the end user to edit the script if they wish to change the trigger button.
Editing should be a bunch simpler - you only need change two places instead of four, and I have commented it REALLY clearly.
#28
Posted 16 January 2013 - 03:53 AM


#29
Posted 16 January 2013 - 04:18 AM

#30
Posted 16 January 2013 - 05:28 AM

#31
Posted 16 January 2013 - 06:04 AM
You didn't leave a sleep, 50 before the script hits zoom by mistake or anything?
I now have zoom as a separate script so that people can pick and choose which bits they want to use - there is nothing stopping you from having two AHK scripts running at one time (As long as they don't both try to use the same hotkey, then you might run into problems)
I also modded the zoom script such that it doesn't trap (Stop the game from seeing the wheel input) the wheelup and wheeldown buttons (I put a ~ before Wheelup: :) - Because the mouse wheel does nothing ingame, we may as well not trap it so that the wheel scrolls through stuff in the mechlab.
[Edit] I forgot to upload the new copy of the zoom script - just put a ~ before WheelUp:: and WheelDown:: if you want this feature. Will amend when I get home tonight,
Edited by evilC, 16 January 2013 - 06:06 AM.
#32
Posted 16 January 2013 - 08:18 AM


Having a look at your new version, too.
#33
Posted 16 January 2013 - 09:04 AM
I haven't found myself using it though, was too paranoid about it going out of synch with the game.
I will try and remember to add it to my script library (http://evilc.com/files/ahk/mwo) so you can have a play if you want.
Edited by evilC, 16 January 2013 - 09:05 AM.
#34
Posted 16 January 2013 - 09:36 AM
evilC, on 16 January 2013 - 09:04 AM, said:
I haven't found myself using it though, was too paranoid about it going out of synch with the game.
I will try and remember to add it to my script library (http://evilc.com/files/ahk/mwo) so you can have a play if you want.
I will definitely give it a go. This sounds sweet.

#35
Posted 16 January 2013 - 10:04 AM
* assign TAG to every weapon group you have weapons in
* assign TAG to a weapon group of its own
E.g. on one of my 'mechs I have
* Weapon group 1: Arm-mounted lasers and TAG
* Weapon group 2: Missiles and TAG
* Weapon group 3: TAG
This means I can use weapon group 3 to only use my TAG (if I want to be sneaky), but it also means I'll be lighting up any target I fire on with TAG.
It's not as good as a toggle, but it's quite usable and completely in-game.
#36
Posted 16 January 2013 - 10:29 AM
stjobe, on 16 January 2013 - 10:04 AM, said:
* assign TAG to every weapon group you have weapons in
* assign TAG to a weapon group of its own
E.g. on one of my 'mechs I have
* Weapon group 1: Arm-mounted lasers and TAG
* Weapon group 2: Missiles and TAG
* Weapon group 3: TAG
This means I can use weapon group 3 to only use my TAG (if I want to be sneaky), but it also means I'll be lighting up any target I fire on with TAG.
It's not as good as a toggle, but it's quite usable and completely in-game.
This is a good idea, and I tried it, but often it doesn't work as good.
When you group it with ballistic weapons, it often doesn't connect to the target because you have to lead the target. Same goes for SRMs.
When you group it with lasers and you happen to play on Caustic or have a mech that generally runs hot, chainfire will break both TAG and the weapon group itself, since the game counts it as a regular weapon.
For LRMs and streaks...it would mostly work, yes.
The main problem for me was that I noticed how micromanaging more than 3 or 4 weapon groups really hurts my battle performance. So having just 3 weapon groups and a toggleable TAG was favorable for me.

#37
Posted 16 January 2013 - 11:14 AM
Hopefully PGI gives us a proper toggle someday.
#38
Posted 16 January 2013 - 12:09 PM
#39
Posted 17 January 2013 - 02:13 AM
evilC, on 16 January 2013 - 12:09 PM, said:
I tried it yesterday once, but for some reason it didn't work. It was the only script running. Is there something I must do for it to start working? In the game, zoom is normally set to "z". Maybe I have to change that?
Anyway...from what I've seen, the script seems indeed a bit...overcomplicated. I think I'd rather stay with the more easier version. No offence.

#40
Posted 17 January 2013 - 04:34 AM
I agree about the complexity, hence I don't even use it myself.
Was more an exercise to see how it would handle if it was done...
Edited by evilC, 17 January 2013 - 04:35 AM.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users