Thread Tools Display Modes
02-22-15, 08:49 PM   #1
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Pick for 2/22: CompressMacro (updated)

CompressMacro:



Having trouble fitting your macro into the 255 character limit? There are many aliases for slash commands that you may not be aware of, that can help you squeeze in that last spell or the final word of your trade message. Simply enter your macro text into the top window of the CompressMacro frame and a compressed version (if possible) will be shown to you underneath. It also provides a list of in-game slash commands, including those registered by addons, for your reference.

Get the most out of your macros, and check this out here.



For previous Picks of the Week, visit our PotW archive forum.

Are you the author of a mod that you think belongs in this spotlight? Just upload/update it to WoWInterface, and it will automatically be considered for that week's Pick.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
02-22-15, 09:46 PM   #2
Banknorris
A Chromatic Dragonspawn
 
Banknorris's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 153
This script eliminate the use of #showtooltip:
Lua Code:
  1. hooksecurefunc(GameTooltip,"SetAction",function(self,action)
  2.     local action_type,macro_id = GetActionInfo(action)
  3.     if action_type=="macro" then
  4.         local _,_,spell_id = GetMacroSpell(macro_id)
  5.         if spell_id then
  6.             GameTooltip:SetSpellByID(spell_id)
  7.         else
  8.             local _,link = GetMacroItem(macro_id)
  9.             if link then
  10.                 local item_id = tonumber(link:match("item:(%d+)"))
  11.                 GameTooltip:SetItemByID(item_id)
  12.             end
  13.         end
  14.         GameTooltip:Show()
  15.     end
  16. end)
So a macro like:
Code:
#showtooltip
/cast [@focus,harm][]Wind Shear
becomes

Code:
/cast [@focus,harm][]Wind Shear
but if you have something like this

Code:
#showtooltip Hex
/cast Nature's Swiftness
/cast Hex
you will not get benefit from it, you will still need to use the whole line.
  Reply With Quote
02-23-15, 12:03 PM   #3
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,313
Originally Posted by Banknorris View Post
This script eliminate the use of #showtooltip:
Lua Code:
  1. hooksecurefunc(GameTooltip,"SetAction",function(self,action)
  2.     local action_type,macro_id = GetActionInfo(action)
  3.     if action_type=="macro" then
  4.         local _,_,spell_id = GetMacroSpell(macro_id)
  5.         if spell_id then
  6.             GameTooltip:SetSpellByID(spell_id)
  7.         else
  8.             local _,link = GetMacroItem(macro_id)
  9.             if link then
  10.                 local item_id = tonumber(link:match("item:(%d+)"))
  11.                 GameTooltip:SetItemByID(item_id)
  12.             end
  13.         end
  14.         GameTooltip:Show()
  15.     end
  16. end)
You should use GameTooltip:SetHyperlink(Link) instead of GameTooltip:SetItemByID(ID). This will include suffixes and the associated stats for items that have them.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
02-23-15, 12:19 PM   #4
Banknorris
A Chromatic Dragonspawn
 
Banknorris's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 153
Awesome! Thank you very much!
  Reply With Quote

WoWInterface » Site Forums » WoWI's Pick(s) of the Week » Pick for 2/22: CompressMacro (updated)

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off