Linking Community/Guild into Macro

Hello,

As the title states I’m looking to permanently link a guild or community into a macro.

Tried searching, and the closest thing I could get were spells. Any advice or where to look?

(Edit) see my follow-up post #5: Linking Community/Guild into Macro - #5 by Ketho-boulderfist

You can link guilds or communities into a macro but it’s a bit unintuitive, you need to select the macro editbox first and then click the share link button

Alternatively you can announce the link through the api, e.g. to the trade channel

/run local c=ClubFinderGetCurrentClubListingInfo(C_Club.GetGuildClubId())SendChatMessage("test "..GetClubFinderLink(club.clubFinderGUID, club.name).." message","CHANNEL",nil,2)
6 Likes

That worked! Thank you.

I’m not having luck with this. It just posts back in my regular chat window, even though my cursor’s targeted to the macro text editor right before I press “share link”. Are you aware of any recent changes that would impact your solution?

4 Likes

It looks like patch 8.3.0 broke that functionality since it steals your focus whenever you click somewhere :sweat_smile: New chat behaviour

How to make it work: https://streamable.com/k1mqqq

  1. Open the guild and macro frame, Click “Invite Member
  2. Focus the macro text box
  3. SHIFT-Click “Link Post in Chat

Alternatively, just post it to chat first and then Shift-Click it to your macro.

25 Likes

Hi, I love you. Thank you. <3

2 Likes

Thank you, this worked like a charm!

1 Like

OMG Finally I found the info I needed. The mouse code is GOLDEN! Thanks a ton.

Only works if there is enough space in the macro window, the link was over 83 characters long

1 Like

not sure what you mean, you don’t even need to put that script in a macro, just run it straight from the chat window before you insert your guild link into a macro

1 Like

Thank you!!!

1 Like

Did the 9.-0.1 patch break it? I’ve tried using both versions of your commands and it always defaults the guild invite to the /say channel even after using the Unregister command. Barring that, is there a straight / command like /cast that can be used in a macro?

EDIT: Finally got it to work, apparently longer guild names get problematic.

Thanks a lot this has helped!

I updated the code so that it is lighter on characters and you can adjust the channel that you want to put it in.

/run SendChatMessage(""..GetClubFinderLink(club.clubFinderGUID, club.name).." YOUR TEXT HERE","CHANNEL",nil,1)

replace the “YOUR TEXT HERE” part with what you want to say and change the number at the end of the string to allow you to print the message with a link to your guild application into the desired channel.

when you click the macro the output will format the message to [Guild:Your Guild] YOUR TEXT HERE. If you want to put text at the front just insert your text between the “” in front of …GetClub string. Make sure you leave the “” in front or at the end or the macro will fail to execute.

Hey, tried using this and got this error:

‘Message: [string “SendChatMessage(”"…GetClubFinderLink(club…"]:1: attempt to index global ‘club’ (a nil value)
Time: Sat Dec 12 17:55:09 2020
Count: 2
Stack: [string “SendChatMessage(”"…GetClubFinderLink(club…"]:1: attempt to index global ‘club’ (a nil value)
[string “=[C]”]: ?
[string “SendChatMessage(”"…GetClubFinderLink(club.clubFinderGUID, club.name)…" is recruiting for heroic and mythic progression! In need of R Shaman and ranged spellcaster DPS, but anyone can apply! Whisper me for more information.",“CHANNEL”,nil, 1)"]:1: in main chunk
[string “=[C]”]: in function RunScript' [string "@Interface\FrameXML\ChatFrame.lua"]:2182: in function ?’
[string “@Interface\FrameXML\ChatFrame.lua”]:5093: in function ChatEdit_ParseText' [string "@Interface\FrameXML\ChatFrame.lua"]:4757: in function ChatEdit_SendText’
[string “@Interface\FrameXML\ChatFrame.lua”]:3049: in function <Interface\FrameXML\ChatFrame.lua:3042>
[string “=[C]”]: in function UseAction' [string "@Interface\FrameXML\SecureTemplates.lua"]:345: in function handler’
[string “@Interface\FrameXML\SecureTemplates.lua”]:654: in function <Interface\FrameXML\SecureTemplates.lua:602>
[string “=[C]”]: ?
[string “@Interface\FrameXML\SecureHandlers.lua”]:266: in function <Interface\FrameXML\SecureHandlers.lua:263>
[string “=[C]”]: ?
[string “@Interface\FrameXML\SecureHandlers.lua”]:296: in function <Interface\FrameXML\SecureHandlers.lua:279>
[string “=(tail call)”]: ?

still working on it. It seems like the dataset needed is not there without loading it first after you login.

So what I have done as a work around for now is you can run the original script above after you open your guild interface. that seems to load the variable data required. here it is again below. you should see it message as a say. then you can run my revision and it will post it until you quit and reopen the game. It will at least let you add more characters. Going to keep at it as I have time cause this is something that bothers me. lol

/run local club = ClubFinderGetCurrentClubListingInfo(C_Club.GetGuildClubId()); SendChatMessage("test "..GetClubFinderLink(club.clubFinderGUID, club.name).." link")

so in summary, for now, perform the following.

Step1: Open your guild information by pressing j
Step2: Make a macro with the following in it: (Adjust the information however you would like for the message.)

/run local club = ClubFinderGetCurrentClubListingInfo(C_Club.GetGuildClubId()); SendChatMessage(""..GetClubFinderLink(club.clubFinderGUID, club.name).." LF active players to join us for casual raiding. Apply or PST. ","CHANNEL",nil,1)

This should now run in the whatever channel you specified at the end of the string.

working to make the functionality a little better. after you do this my option to add more text should work as well. Doing some testing right now actually.

2 Likes

Hey, appreciate the feedback. I’ll give this a shot tonight when I get a chance. Thanks again, you’re awesome.

I can’t get this to work, is anyone having problems with it still?

1 Like

I got it to work again with simple clicking.

While an empty macro is up, bring up the guild panel.

Control + Shift Click the guild link to chat button.

The will /cast but its in your macro now.

3 Likes

WTF… this was the EASIEST instruction I’ve come across LOL. THANK YOU!!

  1. Open Macro
  2. Open Guild
  3. Click on “Invite Member” (located in Chat tab)
  4. Place cursor BACK in the macro window and shift + click on “Link Post in Chat”
  5. Now your macro should say "/cast [Guild: YOUR GUILD].
  6. You can remove the “/cast” part and replace everything around the link with the chat channel, i.e. /1, /2…

Thanks again Wynners!!! <3

11 Likes