This site makes extensive use of JavaScript.
Please enable JavaScript in your browser.
Classic Theme
Thottbot Theme
Item link in Macro
Post Reply
Return to board index
Post by
dpoyesac
So I want a macro to
spam
politely repeat the same trade message without having to type it in all the time -- but I want the message to include a link to the
riding crop
to let people know exactly how cool the item is.
Anyone have any hints? I want to do 2 things that are a mystery to me:
1. As soon as I hit the macro button it posts directly to the trade channel, and
2. the post includes links, just as if I had shift-clicked the item in my profession window.
Thanks in advance.
Post by
Miyari
This page
should provide you with the instruction you are looking for. :)
Post by
Tildy
Great link, Miyari.
As that link says, you can make a macro with a link in it by running this script after replacing <your message> with whatever you want to say, just as if you were typing it in the chat window, links and all.
/run CreateMacro("Macro Name",1,"<your message>",1,1))
For example:
/run CreateMacro("testlink",1,"/2 Look, an item: !",1,1))
You would actually shift+click the cooking pot link right in there. When you look at the text in the macro pane after running the script and creating the macro there, you will only see what looks like plain text reading , but it is in fact a link and if you, for example, pressed backspace on it, it would erase the entire set of characters. That might not make entirely too much sense, but neither does it matter entirely too much.
The function CreateMacro actually returns the index of the macro, where it was placed in your macro pane. You can do some neat things with that, such as:
/run PickupMacro(CreateMacro("testlink",1,"zomg an item: !",1,1))
That will create the macro, and place the macro icon 'button' thing right on your cursor as though you had opened your macro pane and picked it up. You can also then have your cursor set the icon down on a bar somewhere if you so desire.
/run PickupMacro(CreateMacro("testlink",1,"zomg an item: !",1,1)); PlaceAction(1)
The 1 is the action slot number the macro will be placed in.
Fun stuff!
Post by
38526
This post was from a user who has deleted their account.
Post by
LoqueNahak
I necro-resurrect this thread for a simple question: how do I place the created macro in the GENERAL tab? It works fine but I've no more room in my character-specific macro panel...
Post by
Wikipedia
Replace '/2' with '/1'.
Post by
Wildhorn
I necro-resurrect this thread for a simple question: how do I place the created macro in the GENERAL tab? It works fine but I've no more room in my character-specific macro panel...
You cant link items in general chat.
Post by
tandroy
Uh, he means the account-wide macro tab vs the character specific macro tab. Not general chat vs trade chat.
Post by
Wildhorn
Oh, damn me. Thats what happen when you dont sleep and do not read the necroed part :P
Well, to answer his question, you...
read
the API
Post by
LoqueNahak
Well, to answer his question, you...
read
the API
Good link, that was the solution.
Post Reply
You are not logged in. Please
log in
to post a reply or
register
if you don't already have an account.