[REQUEST] Macro activated by GIMX profile

Discuss everything to do with GIMX here
Post Reply
EduardoP
Posts: 21
Joined: Mon May 27, 2013 5:10 pm

[REQUEST] Macro activated by GIMX profile

Post by EduardoP »

Hello, would be possible to code the following features for GIMX macros?
#1 -> MACRO code for switching between GIMX profiles
#2 -> MACRO TRIGGERING by GIMX profiles (different MACROS for multiple profiles)

That would really help on setting up more cleaner and elaborated macros. Since in most of my macros, TRIGGER function is already being used for something else, setting up a a TRIGGER with the assigned profile switch key is not enough for most of my cases.

Thank you in advance.

Best regards.
User avatar
Matlo
Posts: 5768
Joined: Wed Jul 06, 2011 7:01 am
Location: France
Contact:

Re: [REQUEST] Macro activated by GIMX profile

Post by Matlo »

Hello,

It is already possible to trigger a profile switch in macros:
  • in gimx-config, assign a profile trigger (for example a key)
  • in the macro code, press that key
For the second point, I think the macro activation feature can be used: https://gimx.fr/wiki/index.php?title=Ma ... activation

If it does not work for you, please post a log file (it contains config file and macros).
GIMX creator
EduardoP
Posts: 21
Joined: Mon May 27, 2013 5:10 pm

Re: [REQUEST] Macro activated by GIMX profile

Post by EduardoP »

Hi Matlo,
Thank you for the quick reply. #1 is actually solved.

#2 -> MACRO TRIGGERING by GIMX profiles (different MACROS for multiple profiles)

Please correct me if I'm wrong, but macro activation apply for different config files. Right?
My request would be for different macros for different profiles on the same config xml file.

I'm already using TRIGGER on my macro. I need to add more TRIGGER conditions as a chain of events for different profiles.
What I'm trying to code is an aim compensation when strafing (press A and D keys), when ADS (MBRIGHT).

There is a single condition on the macro below, when I strafe (press A or D) before aiming down side, and this cause the MACRO to work in the wrong order... KEYS A or D was already pressed when entered on the TRIGGER condition (MBRIGHT pressed).
MACRO KEYDOWN d
TRIGGER MBUTTONDOWN BUTTON_RIGHT
KEYDOWN p

MACRO KEYDOWN p
TRIGGER MBUTTONDOWN BUTTON_RIGHT
MAXIS 0 -20
KEYDOWN p

MACRO KEYDOWN a
TRIGGER MBUTTONDOWN BUTTON_RIGHT
KEYDOWN o

MACRO KEYDOWN o
TRIGGER MBUTTONDOWN BUTTON_RIGHT
MAXIS 0 20
KEYDOWN o

MACRO KEYUP a
TRIGGER MBUTTONDOWN BUTTON_RIGHT
KEYDOWN o

MACRO KEYUP d
TRIGGER MBUTTONDOWN BUTTON_RIGHT
KEYDOWN p

MACRO F4
TRIGGER MBUTTONUP BUTTON_RIGHT
User avatar
Matlo
Posts: 5768
Joined: Wed Jul 06, 2011 7:01 am
Location: France
Contact:

Re: [REQUEST] Macro activated by GIMX profile

Post by Matlo »

TRIGGER is actually the activation trigger. It enables the macro. I know, it's confusing.

Instead of:

Code: Select all

MACRO KEYDOWN d
TRIGGER MBUTTONDOWN BUTTON_RIGHT
KEYDOWN p
Try:

Code: Select all

MACRO MBUTTONDOWN BUTTON_RIGHT
TRIGGER KEYDOWN d
KEYDOWN p
And add "INIT ON" after the TRIGGER line for macros that you want active on start.

For example, with the above macro, if you press d, macro gets enabled. If you then press right mouse button, macro gets played. If you release d (but still have right mouse button pressed), the same macro is still played. You probably want another macro played in this case. Sadly there is no way to have this currently: the macro feature is stateless, it is based on events only.
GIMX creator
Post Reply