|
Ethershade Beginner
Joined: 17 Oct 2008 Posts: 11
|
Posted: Sun Oct 26, 2008 3:35 am
Multiple macros for a single key? |
Im wondering if its possible to have multiple macros activate from a single key
I have one macro on the 1 on the keypad that sends
#if (ESMODE="movement") {sw}
and another one on the 1 on the numpad that sends
#if (ESMODE="empathy") {GRID REPAIR @turret1}
Anyway, The second one works no matter what as long as the if condition is met, but the first one only works if the second one is closed/removed from the session. Any ideas how to get around this? I cannot put them in the same package or on the same macro, they must remain seperate from each other. The first one needs to be able to execute with or without the other.
I forgot to mention, the variable ESMODE is in the first package |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sun Oct 26, 2008 3:58 am |
Combine them into one macro. You are using one variable to determine what the macro is supposed to do, so just use a #CASE or #SWITCH to do that.
Alternatively, you could create separate macros and use #T+ and #T- to turn them on and off as needed. If you do things this way, know that you can only have one active macro per key at any one time. |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sun Oct 26, 2008 10:32 am |
#case and #switch are definitely the way to go about this particular problem. If you're doing something more complex with your macros, you might want to consider using events. Your 1 macro would do #raise ButtonPressNumPad1 or something, and then you put all your code in different ButtonPressNumPad1 event handlers. You can then enable or disable the event handlers as you like.
|
|
|
|
|
|