Thread Tools Display Modes
03-05-08, 04:29 PM   #1
Layrajha
A Frostmaul Preserver
 
Layrajha's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 275
Recover the target of one of Clique's actions

Hello,

I've encountered a little issue with Clique. Well, it's probably more general than just Clique, but you may still be able to help me there.
Let's say that I have PoF bound with Clique. I'd like to announce things when about my target when I use PoF, so obviously, the best is to use a custom macro. However, the obvious "%t" for simple macros or "target" unidID for scripts is obviously not the target of the clique action, but my current target, which I do not care about the sightliest.
Question is:
Do I have an easy way to recover the unitID I need? Or at least the button I cliqued on (which is more or less equivalent)?

Thank you for your time (and for Clique ^^),

Layrajha
  Reply With Quote
03-06-08, 02:04 AM   #2
Cladhaire
Salad!
 
Cladhaire's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Jul 2005
Posts: 1,935
The mouseover unit is what you want.
__________________
"There's only one thing that I know how to do well and I've often been told that you only can do what you know how to do well, and that's be you-- be what you're like-- be like yourself. And so I'm having a wonderful time, but I'd rather be whistling in the dark..."
  Reply With Quote
03-06-08, 04:00 AM   #3
Layrajha
A Frostmaul Preserver
 
Layrajha's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 275
Wow, I wonder why I didn't think of that I expected something a bit complicated, and it's so simple
Thank you very much. I didn't realize that it's quite likely that my mouse is over a button when I click it

Though, just out of curiosity, if I used a macro to simulate the click (can't remember the syntax, but I'm pretty sure that there was a macro command to click on a UI button with a specific mouse button), mouseover would probably not work: would there be another option to make it work?
  Reply With Quote
03-06-08, 04:04 AM   #4
Cladhaire
Salad!
 
Cladhaire's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Jul 2005
Posts: 1,935
Nope, it can't just guess your target in that case. You could get the attribute programatically using ButtonName:GetAttribute("unit").
__________________
"There's only one thing that I know how to do well and I've often been told that you only can do what you know how to do well, and that's be you-- be what you're like-- be like yourself. And so I'm having a wonderful time, but I'd rather be whistling in the dark..."
  Reply With Quote
03-06-08, 04:37 AM   #5
Layrajha
A Frostmaul Preserver
 
Layrajha's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 275
Ok. Though, that's assuming that I know what button has been pressed (from the custom macro). I tried (because it was worth trying... maybe ^^) to see what "this" refers to, in a custom macro of Clique, and it is the Macro editbox. The odds for it to refer to the button were slim, but hey! What else
I guess that some ugly modifications to Clique could give ways to do that (but I admit there is absolutely no interest ).
Thank you again for your time.
  Reply With Quote
03-06-08, 04:38 AM   #6
Cladhaire
Salad!
 
Cladhaire's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Jul 2005
Posts: 1,935
It has nothing to do with Clique.. you need the Blizzard API to accomplish this very odd off-thing. Clique can't do anything for you.
__________________
"There's only one thing that I know how to do well and I've often been told that you only can do what you know how to do well, and that's be you-- be what you're like-- be like yourself. And so I'm having a wonderful time, but I'd rather be whistling in the dark..."
  Reply With Quote

WoWInterface » Featured Projects » Cladhaire's Mods » Recover the target of one of Clique's actions


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off