Jump to content

Constant Fire For Tag


88 replies to this topic

#1 GODzillaGSPB

    Member

  • PipPipPipPipPipPipPipPipPip
  • 2,028 posts
  • LocationGermany

Posted 11 January 2013 - 02:19 PM

I know this topic:

http://mwomercs.com/...63#entry1342463

and this:

http://mwomercs.com/...-configuration/

But there was another, giving instructions how to do this with a macro using a software or tool. Problem is I cannot find it. Can somebody help me out?

#2 evilC

    Member

  • PipPipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 1,298 posts
  • LocationLondon, UK

Posted 14 January 2013 - 10:42 AM

You are probably talking about my macro?

http://evilc.com/fil...wo/tagtoggle.ahk

You need Autohotkey to use this, and bind mouse3 (middle mouse) to the weapon group with TAG in it.
It also sets mouse wheel up as zoom in and wheel down as PIP zoom, but if you want you could easily remove that.

Edited by evilC, 30 January 2013 - 04:05 AM.


#3 Empedocles

    Member

  • PipPip
  • 26 posts
  • LocationLodnod - Home of pefnold and dnaggermoose.

Posted 14 January 2013 - 02:03 PM

Macros? Pffft. Whats wrong with a blob of bluetack on your keyboard?

#4 GODzillaGSPB

    Member

  • PipPipPipPipPipPipPipPipPip
  • 2,028 posts
  • LocationGermany

Posted 15 January 2013 - 06:19 AM

View PostevilC, on 14 January 2013 - 10:42 AM, said:

You are probably talking about my macro?

http://evilc.com/fil...wo/zoom+tag.ahk

You need Autohotkey to use this, and bind mouse3 (middle mouse) to the weapon group with TAG in it.
It also sets mouse wheel up as zoom in and wheel down as PIP zoom, but if you want you could easily remove that.


YES, thank you. Will have a look at it. :)

View PostEmpedocles, on 14 January 2013 - 02:03 PM, said:

Macros? Pffft. Whats wrong with a blob of bluetack on your keyboard?


Something I should've mentioned right at the start: I use a throttle and the mouse. Keyboard is a bit out of reach. Close enough to use TAB for the scoreboard and SPACE to open / close missile bay doors, but that's about it. So, no keyboard. ^^

#5 evilC

    Member

  • PipPipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 1,298 posts
  • LocationLondon, UK

Posted 15 January 2013 - 08:22 AM

Should be easy to alter the script to use a joystick button instead of middle mouse.
To change the button to say Joystick button 5, you would search the script for "MButton" and replace all instances with "Joy5"

Let me know if you need any help

#6 StalaggtIKE

    Member

  • PipPipPipPipPipPipPipPipPip
  • The Raider
  • The Raider
  • 2,304 posts
  • LocationGeorgia, USA

Posted 15 January 2013 - 08:25 AM

I will be glad once PGI get around to making TAG toggle. Running with a permanent "hello world!" beacon on your nose, is pretty detrimental.

Edited by StalaggtIKE, 15 January 2013 - 08:26 AM.


#7 evilC

    Member

  • PipPipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 1,298 posts
  • LocationLondon, UK

Posted 15 January 2013 - 08:28 AM

View PostStalaggtIKE, on 15 January 2013 - 08:25 AM, said:

I will be glad once PGI get around to making TAG toggle. Running with a permanent "hello world!" beacon on your nose, is pretty detrimental.

So Don't. Use my script and turn it on or off as you please.
My script even lights up the ScollLock light on your keyboard to remind you it is on (For when it is too bright to see the beam easily)

#8 StalaggtIKE

    Member

  • PipPipPipPipPipPipPipPipPip
  • The Raider
  • The Raider
  • 2,304 posts
  • LocationGeorgia, USA

Posted 15 January 2013 - 08:33 AM

View PostevilC, on 15 January 2013 - 08:28 AM, said:

So Don't. Use my script and turn it on or off as you please.
My script even lights up the ScollLock light on your keyboard to remind you it is on (For when it is too bright to see the beam easily)

Thanks. However I prefer not to run a 3rd party program. I like to run as little in the background as possible.

Edited by StalaggtIKE, 15 January 2013 - 08:33 AM.


#9 evilC

    Member

  • PipPipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 1,298 posts
  • LocationLondon, UK

Posted 15 January 2013 - 08:43 AM

View PostStalaggtIKE, on 15 January 2013 - 08:33 AM, said:

Thanks. However I prefer not to run a 3rd party program. I like to run as little in the background as possible.

The script uses very minimal resources, especially the TAG toggle, as when you are not toggling on or off, it does not do anything.
You should not notice a single FPS difference between using it and not using it, no matter how slow your PC. It only takes ~1.2MB of RAM also.

#10 StalaggtIKE

    Member

  • PipPipPipPipPipPipPipPipPip
  • The Raider
  • The Raider
  • 2,304 posts
  • LocationGeorgia, USA

Posted 15 January 2013 - 08:47 AM

View PostevilC, on 15 January 2013 - 08:43 AM, said:

The script uses very minimal resources, especially the TAG toggle, as when you are not toggling on or off, it does not do anything.
You should not notice a single FPS difference between using it and not using it, no matter how slow your PC. It only takes ~1.2MB of RAM also.

It's more of a general rule of mine. I prefer a minimalist setting. It should be on PGI to fix this "problem."

#11 Abivard

    Member

  • PipPipPipPipPipPipPipPip
  • Shredder
  • 1,935 posts
  • LocationFree Rasalhague Republic

Posted 15 January 2013 - 08:58 AM

assign tag to weapon group 6,
assign weapon group 6 to say the + key on numpad,
fold a piece of paper and wedge the key down,
be advised, opening map or looking at player ping turns tag off.

#12 GODzillaGSPB

    Member

  • PipPipPipPipPipPipPipPipPip
  • 2,028 posts
  • LocationGermany

Posted 15 January 2013 - 09:00 AM

View PostevilC, on 15 January 2013 - 08:22 AM, said:

Should be easy to alter the script to use a joystick button instead of middle mouse.
To change the button to say Joystick button 5, you would search the script for "MButton" and replace all instances with "Joy5"

Let me know if you need any help


I use a throttle and the mouse. And I will definitely use the middle mouse button for TAG as suggested, as all my buttons on the throttle are set for other functions.

But thanks for the offer. I will try this out later.

...yes I have a question right now: How does the script determine which button I set up for TAG (weapon group) in the game setup?


/edit: I think I got it, I understand it. I mapped zoom and pip-zoom back to the original keys and middle mouse button to weapon group 5. The script simply sends "z" via wheel-up, "v" via wheel-down and makes it so the middle-mouse-button stays permanently active when pressed once and off when pressed a second time.

Simple, yet efficient solution, very well done! ;)

Edited by GODzillaGSPB, 15 January 2013 - 09:16 AM.


#13 evilC

    Member

  • PipPipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 1,298 posts
  • LocationLondon, UK

Posted 15 January 2013 - 10:21 AM

I saw your PM Godzilla about wanting wheel to control the TAG toggle. Do you still want this or does this last post supersede that request?

Otherwise, yeah, you got it.

Edited by evilC, 15 January 2013 - 10:21 AM.


#14 GODzillaGSPB

    Member

  • PipPipPipPipPipPipPipPipPip
  • 2,028 posts
  • LocationGermany

Posted 15 January 2013 - 10:47 AM

View PostevilC, on 15 January 2013 - 10:21 AM, said:

I saw your PM Godzilla about wanting wheel to control the TAG toggle. Do you still want this or does this last post supersede that request?

Otherwise, yeah, you got it.


The PM was written after the post. :unsure: And it is basically the same thing in this post: I understood what it does, but not how and how to modify it to my needs. ^^

So yeah, I'd still like some instructions and / or the modified script. Thanks in advance.

BTW: I think, if not already done, you should definitely start your own topic about your script. It deserves more attention. ;)

#15 evilC

    Member

  • PipPipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 1,298 posts
  • LocationLondon, UK

Posted 15 January 2013 - 11:01 AM

View PostGODzillaGSPB, on 15 January 2013 - 10:47 AM, said:

The PM was written after the post. :unsure: And it is basically the same thing in this post: I understood what it does, but not how and how to modify it to my needs. ^^

So yeah, I'd still like some instructions and / or the modified script. Thanks in advance.

It's pretty simple - for example, to move the TAG toggle to mouse wheel up, delete the current bit that remaps the mouse wheel:
DELETE THIS:
 
  ; Wheel Up is normal zoom
	Wheelup::
		Send {z}
		Return

  ; Wheel down is PIP zoom
	Wheeldown::
		Send {v}
		Return

Then, search for "Mbutton" and replace all instances with "Wheelup".

Job done.

Also, be aware that if the script is already running, you need to reload it for changes to take effect. Right click the green H icon in your system tray and click "Reload This Script" - or you can just double click the AHK file again and say Yes to the "Replace it with this instance?" question that pops up.

View PostGODzillaGSPB, on 15 January 2013 - 10:47 AM, said:

BTW: I think, if not already done, you should definitely start your own topic about your script. It deserves more attention. ;)

For sure, however, I would like to wait until I have virtual joysticks (See this thread) properly working with AutoHotkey.
Once I do, I can combine all the knowledge into one thread, allowing people to mimic keys and/or joystick mappings in one AHK script.
At that point, I may even seek sticky status.

Edited by evilC, 15 January 2013 - 11:03 AM.


#16 GODzillaGSPB

    Member

  • PipPipPipPipPipPipPipPipPip
  • 2,028 posts
  • LocationGermany

Posted 15 January 2013 - 11:29 AM

View PostevilC, on 15 January 2013 - 11:01 AM, said:

It's pretty simple - for example, to move the TAG toggle to mouse wheel up, delete the current bit that remaps the mouse wheel:
DELETE THIS:
 
  ; Wheel Up is normal zoom
	Wheelup::
		Send {z}
		Return
 
  ; Wheel down is PIP zoom
	Wheeldown::
		Send {v}
		Return

Then, search for "Mbutton" and replace all instances with "Wheelup".

Job done.


If I delete both those entries, wouldn't I loose the zoom, too?

I'd like wheelup to be the normal zoom and wheeldown to be TAG. :P So I guess I would just erase the second part, then replace everything "MButton" with "Wheeldown".

Edited by GODzillaGSPB, 15 January 2013 - 11:31 AM.


#17 evilC

    Member

  • PipPipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 1,298 posts
  • LocationLondon, UK

Posted 15 January 2013 - 12:19 PM

View PostGODzillaGSPB, on 15 January 2013 - 11:29 AM, said:


If I delete both those entries, wouldn't I loose the zoom, too?

I'd like wheelup to be the normal zoom and wheeldown to be TAG. :P So I guess I would just erase the second part, then replace everything "MButton" with "Wheeldown".

Precisely.

#18 GODzillaGSPB

    Member

  • PipPipPipPipPipPipPipPipPip
  • 2,028 posts
  • LocationGermany

Posted 15 January 2013 - 12:21 PM

View PostevilC, on 15 January 2013 - 12:19 PM, said:

Precisely.


It now looks like this:

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn  ; Recommended for catching common errors.
;SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
;SendMode Play  ; Games Compatibility.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
#InstallMouseHook
#InstallKeybdHook

TAGMode = 0

; If TAG Mode was toggled on in game, then the game quit before we turned it off,
; Make MButton turn off TAG mode even outside the game
#IfWinNotActive, ahk_class CryENGINE
  ~MButton::
    if (TAGMode ==1){
	  Send {MButton 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 {MButton down}
        SetScrollLockState, On
        TAGMode = 1
    } else {
        Send {MButton up}
        SetScrollLockState, Off
        TAGMode = 0
    }

#IfWinActive


And it works. Yay. :P

But...is it possible to free the MButton? I guess I could insert any kind of keyboard button that is being sent instead of MButton, right? But I suspect it is not as easy as just using "a" or "b". What's the correct code for buttons on the keyboard? Thanks in advance. :wub:

#19 evilC

    Member

  • PipPipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 1,298 posts
  • LocationLondon, UK

Posted 15 January 2013 - 12:45 PM

See how in my script MButton triggers the event (It is bound like MButton: :) AND the script SENDS MButton also.
To free the MButton, change ALL instances of MButton to Wheeldown.

HOWEVER, to get this to work, you would normally bind Wheel Down to the weapon group in MWO, but you cannot bind the wheel normally in MWO.
So, either bind Wheeldown to the weapon group by hacking actionmap,xml, or simply map it to something else (And change the script to hit that button).

Edited by evilC, 15 January 2013 - 12:46 PM.


#20 GODzillaGSPB

    Member

  • PipPipPipPipPipPipPipPipPip
  • 2,028 posts
  • LocationGermany

Posted 15 January 2013 - 12:52 PM

Yes, I already understood the script to that point, that you define a button to press and then define what is sent. And I already noticed that I cannot bind weapon groups to wheeldown the normal way, that's why I wanted to try a keyboard key.

But like I said...I'm pretty sure the keyboard keys cannot be put in the script simply by changing it to...

;TAG Toggle
Wheeldown::
	if (TAGMode == 0){
		Send {a down}
		SetScrollLockState, On
		TAGMode = 1
	} else {
		Send {a up}
		SetScrollLockState, Off
		TAGMode = 0
	}
 
#IfWinActive


Or would it? I thought there is a certain...designation involved. Something like "key_a" maybe...

Edited by GODzillaGSPB, 15 January 2013 - 12:53 PM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users