Now, you can assign a keybind to tell your pet to attack, and you can call this macro when executing other macros. Put the pet attack icon in the first slot on your pet action bar (should be there by default). Make a macro called PetAttack (note caps) with this body: For instance, suppose you want a macro to attack and to cast a spell.
Now, you can assign a keybind for attack, and you can call this macro when executing other macros. script if ( not PlayerFrame.inCombat ) then CastSpellByName("Attack") end Make a macro called Attack (note caps) with this body: To use these two macros, you must first create macros for them. In addition, there are two special bindings for Attack and PetAttack.
Backup this file before you install a new version of SuperMacro. Using these as examples, you can add more keybinds by editing the bindings.xml file. *** The default bindings for this addon provides entries for Macros #1 through #36. If you change the file SM_a while in-game, you need to reload your UI by closing your Macro frame, then entering /script ReloadUI() into the chat line-even better make a macro and keybind for this: script tsi,tsx=FindTradeSkillIndex("Heavy Linen Bandage") if (tsx) then DoTradeSkill(tsi,tsx-1) end Then, your macro would look something like this: You can also put global variables and constants in this file.įunction FunctionName(parameter1, parameter2, etc.)
NOTE: Do not type the tags themselves, but type what is between them.Īlternatively, put extremely long functions in a file called SM_a, which you have to create since the zip doesn't come with this file (so that it doesn't get overwritten when you unzip.) Then put this new macro on your action bar. script RunMacro("Macro1") -more scripting here What you can do is break up the long macro into smaller parts, and have them call each other, like so (where macro 1 is named Macro1): If you put this directly on your action bar and try to activate it, you will get an error because the rest of the line beyond the 256th character will be cut off when the macro is saved. Suppose macro 1 has more than 256 characters.
However, you can get around that if you use call it through another macro, or put long functions in SM_a file, or use the in-game extend editor (explained further down in this document.) ** The letter limit for the entire macro is 256. Enter your macro in the left editbox, and your extended LUA codes and functions in the right editbox. Buttons on the bottom are, in order, delete macro save macro open SuperMacro options frame delete extend save extend exit frame. Buttons at the top create new macros for each category. * The new SuperMacro interface displays 18 (global) account macros on the left and 18 character-specific macros on the right. Put an item link or tradeskill recipe into the macro***** *.Īlso see functions.txt for user-friendly functions and slash commands that can be used in your macros. Some convenient slash commands and functions*****. Run macros through keybinds*** and call other macros with RunMacro()****. Work around the maximum macro character length of 256 characters (system limit).** New SuperMacro frame shows all 18 global and 18 character macros. Its special functions includes the following, and probably more: This addon provides a very much improved interface for macros. You may also create a text file called SM_a and put extra long codes in there. Then, copy your backup Bindings.xml into SuperMacro folder, if you have one. A new directory called SuperMacro will be automatically created, and the files will be extracted there. Unzip the files into WoW/Interface/Addons. Remove virtual templates from toc (Fonts.xml, UIPanelTemplates.xml, ClassTrainerFrameTemplates.xml)īefore you unzip, backup your old Bindings.xml and SM_a that are in the SuperMacro folder (if you have on older version of SuperMacro).
RegisterEventMacro( "ding", 1, "PLAYER_LEVEL_UP") - do something whenever you level up see functions.txt for RegisterEventMacro and UnregisterEventMacro.Įx. Option to wrap long sentences (won't work until they add EditBox:SetNonSpaceWrap() )
Update readme on how to use "Super" macrosįixed compatibilty with Bongos Action Bars //Does not completely solve the problemįixed: FindFirstItem returns correct info for use( %d ) and /use %d įixed: FindFirstSpell returns correct info for /castįixed: /cast spell to show spell's info for (minor) etc.įixed: GetSpellCooldown error popup for SM_Channel()