1. Hi, everybody. As to me to fix on a frame a macro? On a frame it is possible to fix buttons and how me for a place of buttons to put a macro?

    I created "Hello World" macro with the text of "Hello world" and how me a macro to place on a frame?

    I need to add a macro on a frame.

  2. You can use a secure action button with the "macro" type. You can likely find either of these in the index to locate the appropriate chapter.

  3. You can use a secure action button with the "macro" type. You can likely find either of these in the index to locate the appropriate chapter.

    Forgive I you I do not understand. In the book isn't present about it.

    Or how to start to me a macro through:

    frame:SetScript("OnClick", function() .... end)

  4. Second edition, starting at page 289. It is most certainly covered. You use the "macrotext" attribute, with the value being the text of the macro you want to run.

     PlayerFrame:SetAttribute("CTRL-SHIFT-type1", "macro")
     PlayerFrame:SetAttribute("macrotext", "/say Hello")
    

    Or something like that.

  5. Second edition, starting at page 289. It is most certainly covered. You use the "macrotext" attribute, with the value being the text of the macro you want to run.

     PlayerFrame:SetAttribute("CTRL-SHIFT-type1", "macro")
     PlayerFrame:SetAttribute("macrotext", "/say Hello")
    

    Or something like that.

    Doesn't work. How it is correct?

     test = CreateFrame("Button",nil,UIParent,"OptionsButtonTemplate")
     test:Enable(true)
     test:SetWidth(67)
     test:SetHeight(22)
     test:SetText("Test")
     test:SetPoint("CENTER",UIParent,-120,95)
     test:SetAttribute("CTRL-SHIFT-type1", "macro")
     test:SetAttribute("macrotext", "/say Hello")
    
  6. Read the chapter. Run the example. I'm not going to re-write the entire contents of the chapter here. I'll reiterate my first response.

    You need to use the macrotext action for a SecuteActionButton. The examples in the book show precisely how to do this.

    In short, make sure you inherit from the SecureActionButton template.