I want to broadcast a message throughout several channels. When left click, broadcasting to all channels, when right click, just to channel 1. This is my original script, though it exceeds the character limits of a macro. How can I make it shorter?
/run s="a long long long long .... message ..."
/script SendChatMessage(s ,"CHANNEL" , "COMMON" ,"1");
/script if(GetMouseButtonClicked()=="LeftButton") then SendChatMessage(s ,"CHANNEL" , "COMMON" ,"4") end;
/script if(GetMouseButtonClicked()=="LeftButton") then SendChatMessage(s ,"CHANNEL" , "COMMON" ,"7") end;
I was looking for how to use "for each (4,7)
" to replace the last 2 lines, but didn't find a "for each
" syntax for WoW API.