WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Macro Help (https://www.wowinterface.com/forums/forumdisplay.php?f=140)
-   -   Macro that copy my target name (request) (https://www.wowinterface.com/forums/showthread.php?t=59605)

Yukka 06-05-23 07:47 AM

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.
Quote:

/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

SDPhantom 06-06-23 01:22 AM

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.

Yukka 06-06-23 08:41 AM

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.


All times are GMT -6. The time now is 01:31 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI