Triggering macros by switching EQW client windows...

Got a cool macro idea? Wanna request a macro? Here is the place for you!

Moderator: MacroQuest Developers

Shin Noir
a ghoul
a ghoul
Posts: 90
Joined: Tue Aug 05, 2003 8:18 pm

Triggering macros by switching EQW client windows...

Post by Shin Noir » Thu Apr 15, 2004 7:27 am

Is there a way to tell if a EQ window has focus via MQ2? ex:

I have two windows open (let's say, bard, shaman) on the same computer. Now what I tend to do is switch back and forth between boxes to do random things for what the situation arises. I spend most of the time on my shaman's screen, but in some instances I need to switch to the bard for positioning/crowd control/whatever. It would be neat if when the bard's window didn't have focus, a macro would kick in and twist songs for me.. but once I return to the window, it turns itself off allowing me control.

Now it would be easy as far as making a hotbutton to trigger the event (EX: type /stoptwist and then /starttwist to activate/deactivate the macro), but i don't really want to have to type or press something special every single time I switch windows.

Is there a way to recognize when I press "TAB" in the macro? (since I press ALT+TAB when i switch windows). Any suggestions would be appreciated (or code at that matter!)

My finished product will most likely be someone else's twist-macro tweaked with the above condition.. Feel free if you're inclined to make this script for me. Just inform me that you're taking the project otherwise I'll use it as an opportunity to get caught up in my MQing.

Oh, and as a side note, anyone know if there's a way to show raw EXP data about how much a mob gave you? (as opposed to %'s). I remember showEQ giving it for the longest time.. MQ able?

Zazoot
a hill giant
a hill giant
Posts: 163
Joined: Sat Feb 07, 2004 11:02 am

Post by Zazoot » Thu Apr 15, 2004 9:31 am

i dont think thats possible..???????

just make a hotkey with

Code: Select all

/mqpause
ok so you have to press 1 xtra key when you switch

im sure you will get over it !

:o

Marze
a lesser mummy
a lesser mummy
Posts: 60
Joined: Wed Apr 14, 2004 12:08 pm

Re: Triggering macros by switching EQW client windows...

Post by Marze » Tue May 25, 2004 5:54 pm

Shin Noir wrote:Oh, and as a side note, anyone know if there's a way to show raw EXP data about how much a mob gave you? (as opposed to %'s). I remember showEQ giving it for the longest time.. MQ able?
The server stopped sending this information a long time ago. Now they send a number out of 300 something (I think) that represents your % XP.

User avatar
dont_know_at_all
Developer
Developer
Posts: 5450
Joined: Sun Dec 01, 2002 4:15 am
Location: Florida, USA
Contact:

Re: Triggering macros by switching EQW client windows...

Post by dont_know_at_all » Tue May 25, 2004 6:01 pm

Shin Noir wrote:Is there a way to tell if a EQ window has focus via MQ2?
Yes, I'll have a look at exposing it this evening.

Rusty~
a hill giant
a hill giant
Posts: 244
Joined: Wed Apr 14, 2004 2:55 pm

Post by Rusty~ » Tue May 25, 2004 6:21 pm

- MQ2FPS plugin now adds these Top-Level Objects (these are NOT in the reference because they
are from a plugin not built in):
float FPS - Current frames per second
int MaxFPS - Current max frames per second
bool Foreground - Is this session in the foreground?
would something like this in the mainloop of your macro work?

Code: Select all

/if ( ${Foreground} ) {
   do stuff
} else {
   do other stuff
}
*edit* just noticed how old the original post was, and that this is in an old section too :P