1. Hi, I'm working on my first Addon, I'am doing really good thanks to the Book, but now I am in a deadlock.

    What I'm trying to do is: I Have a list of players. I want to select 1 of those players. (The list is from the General chat channel)

    TargetUnit: Is PROTECTED, and as I can see in the API, if I want to use the player's name, the payer must be in my party or raid. So I Discarded that option.

    Using the /target command: I've been searching for 5 days a way to do this with no good results. Finally I tryed the http://www.wowwiki.com/RunSlashCmd approach, but I got the message:

     "<Addon> has been blocked from an action only available to the Blizzard UI"
    

    Maybe due to security constraints I got that message, because I Tryed to use "/target <playerName>" using de EditBox. I'm wondering if I have to use "Secure Execution and Tainting" in order to call that command(/target).

    In Conclusion, I want to know if there is a way to: Target a player, by using the Player's name. (I'm not in party or raid with the player)

    Thank you very much for your help

  2. It looks like you would use TargetUnit, however... that is a protected function. In order to cut down on botting Blizzard protected a lot of things. This includes targeting of players or npcs.

    I'm not sure what you are trying to accomplish in the end, but it looks like you'll need to find another way.

    If you are interested, you should be able to make a button to target a unit.

  3. It looks like you would use TargetUnit, however... that is a protected function. In order to cut down on botting Blizzard protected a lot of things. This includes targeting of players or npcs.

    I'm not sure what you are trying to accomplish in the end, but it looks like you'll need to find another way.

    What I'm trying to do is: I Have a frame with 1 combo box and a button. In the combo box you can select a Class. And when you click que button: The addon must search in the General chat channel for all the players of the selected class.

    In order to get the player class, I must target it first.

    If you are interested, you should be able to make a button to target a unit.

    Can you give me an example pls? Thanks for your help :P

  4. You can only accomplish this using secure templates. This is covered in Chapter 15 in the second edition of the book. You cannot use TargetUnit() or inject any data into the chat box, both of those will show addon blocked and can taint a portion of the UI.