Thread Tools Display Modes
04-28-07, 12:58 PM   #1
GfParagon
A Murloc Raider
Join Date: Apr 2007
Posts: 9
Emulating the tab key

Pressing Tab will select the nearest enemy. How do I Emulate that? There is a function TargetNearestEnemy(); but when i try to use it it says that only blizzard ui can do it. And /TargetNearestEnemy doesn't register as a command. I want to create a macro which will target the nearest enemy if I don't have a focus but if i do have a focus i want to target the focus instead.

Basiclly I want to make a macro that does the following things (This is just psuedo code):
If no target then
If no focus then target nearest enemy
if focus then target focus
end if
if target then
if no focus then
focus target
clear target
end if
if focus then
focus target
target last target (The closest thing to swaping focus and target i could figure out)
end if

Basicly the only thing i can't figure out how to do is make it target the nearest enemy when there is no target and no focus.
  Reply With Quote
04-28-07, 01:10 PM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
All I know is that mods and macros cannot select targets for you.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
04-28-07, 02:40 PM   #3
Tekkub
A Molten Giant
 
Tekkub's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 960
/targetfocus [target=focus,exists,nodead]
/stopmacro [target=focus,exists,nodead]
/targetenemy

Havn't tested but should work. When writing macros, this thread is your friend.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Emulating the tab key


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