Thread Tools Display Modes
06-05-23, 07:47 AM   #1
Yukka
A Theradrim Guardian
 
Yukka's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2020
Posts: 60
Macro that copy my target name (request) [solved]

Hello Can someone nice make a macro that copy my target name? I need my targets names for the titles of the videos I'm recording. But the thing is that I cant take the time to copy my target name during the combat while recording, that would be ugly on the video and it would make me killed. Also some names contains special characters and my keyboard doesnt have them (german, russian, chinese, etc). A quick macro would be great, a macro that copy without showing a confirmation on the screen if possible. Thanks in advance. Have a nice day.

EDIT: I found this, can someone please modify it so it just print the name in the chat, I dont need the health.
/run local u="target" if UnitExists(u) then print(format("%s has %s of %s hp (%.1f%%).",UnitName(u),BreakUpLargeNumbers(UnitHealth(u)),BreakUpLargeNumbers(UnitHealthMax(u)),UnitHealth(u)*100/UnitHealthMax(u))) end

Last edited by Yukka : 06-06-23 at 08:42 AM.
  Reply With Quote
06-06-23, 01:22 AM   #2
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,323
Code:
/run local u="target";if UnitExists(u) then print((UnitName(u)));end
Note: UnitName() has two returns. The second would be the name of the server the unit is from if not on the same server. The extra parenthesis truncates this to only print the first return, which is the name you want.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
06-06-23, 08:41 AM   #3
Yukka
A Theradrim Guardian
 
Yukka's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2020
Posts: 60
Awesome. With this macro and an addon that copy the chat I will be able to copy the names Great help from you as always, thanks.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » Macro Help » Macro that copy my target name (request)


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