Arbitrary Commands
Arbitrary Commands provides a popup menu containing player-programmable scripts or slash commands. The menu can be shown by any LDB launcher; by default a minimap-pimple icon is used. The scripts are gathered in nested menus, arranged by the player. The scripts can be either slash commands or snippets of Lua code, just like a long '/script'.
I kept finding myself wanting to run the same bits of /script over and over, but didn't want to use up a macro slot OR find a place to store the macro buttons (screenshot). There are commands that I use just often enough that I don't like to keep typing them in again and again, but didn't feel like wrapping in a macro or using up a keybind (screenshot). And there are actions that would require lots of clicks in the game's menus, but translate to single Lua functions (screenshot). All of these things conspired to cause me to write this addon back in vanilla days and rewrite it for Wrath; I'm finally getting around to inflicting it on the rest of the world.
HOWTO
Use /arbit or the LDB/minimap launcher to open the main menu. From the Player Scripts tab, click the top left menu named Instructions. Submenus under Instructions describe specific details.
Details
Changed in 0.9.1: The functions 'CHAT' and 'SLASH' have been renamed to 'AC_CHAT' and 'AC_SLASH'. You will need to update your scripts accordingly.
Profiles
Standard Ace3 profiles are used. Both the options and the scripts are per-profile.
Examples
A few example scripts are included. They are all small scripts that I use (or have used in the past) for the reasons above. They tend to be actions which would otherwise require mouse clicking through multiple layers of Blizzard menus or other addon menus. You can delete any/all of the packaged examples. If you reset a profile the examples will return.
Scripting Restrictions
- You still can't get around any of the restrictions in this link.
- Player scripts are not considered "protected/secure" and therefore cannot do certain things. See this link if you are unfamiliar with secure frames.
- That also means that macro-style entries cannot do /cast, /use, and so forth. (I might try and implement this kind of thing... someday... ugh.)
Programming from other addons
New player scripts can be added by other addons. This functionality is still at a primitive stage, but documentation and functioning examples are included.
Localization
If you're a reasonably proficient speaker of non-English languages, any translations you can do would be welcome! Just make changes at http://www.wowace.com/addons/arbitcomm/localization/ and then send me a PM to notify me. I can offer nothing in return except public credit, my appreciation, and a beverage of your choice if you're ever in town.
I'm having trouble now that patch 5.4 is live. Clicking on a scrollbar (not on the up/down arrows, but in the main body) sometimes causes this error:
15x AceGUI-3.0-33\widgets\AceGUIContainer-TreeGroup.lua:493: attempt to index local "line" (a nil value)
AceGUI-3.0-33\widgets\AceGUIContainer-TreeGroup.lua:493: in function "RefreshTree"
AceGUI-3.0-33\widgets\AceGUIContainer-TreeGroup.lua:235: in function <AceGUI-3.0\widgets\AceGUIContainer-TreeGroup.lua:230>
Locals:
frame = AceConfigDialogTreeGroup3ScrollBar {
0 = <userdata>
ScrollDownButton = AceConfigDialogTreeGroup3ScrollBarScrollDownButton {}
ScrollUpButton = AceConfigDialogTreeGroup3ScrollBarScrollUpButton {}
obj = <table> {}
}
value = 13.476644515991
self = <table> {
SelectByPath = <func> @ButtonTimers\Libs\..\widgets\AceGUIContainer-TreeGroup.lua:521
SetTree = <func> @ButtonTimers\Libs\..\widgets\AceGUIContainer-TreeGroup.lua:361
SetText = <func> @ArbitraryCommands\LibFarmbuyer.lua:236
RefreshTree = <func> @ButtonTimers\Libs\..\widgets\AceGUIContainer-TreeGroup.lua:388
levels = <table> {}
status = <table> {}
CreateButton = <func> @ButtonTimers\Libs\..\widgets\AceGUIContainer-TreeGroup.lua:320
scrollbar = AceConfigDialogTreeGroup3ScrollBar {}
AceGUIWidgetVersion = 1
Select = <func> @ButtonTimers\Libs\..\widgets\AceGUIContainer-TreeGroup.lua:508
LayoutFinished = <func> @ButtonTimers\Libs\..\widgets\AceGUIContainer-TreeGroup.lua:605
enabletooltips = false
height = "fill"
localstatus = <table> {}
content = <unnamed> {}
OnWidthSet = <func> @ButtonTimers\Libs\..\widgets\AceGUIContainer-TreeGroup.lua:544
showscroll = true
lines = <table> {}
OnRelease = <func> @ButtonTimers\Libs\..\widgets\AceGUIContainer-TreeGroup.lua:300
SetTreeWidth = <func> @ButtonTimers\Libs\..\widgets\AceGUIContainer-TreeGroup.lua:575
parent = <table> {}
SelectByValue = <func> @ButtonTimers\Libs\..\widgets\AceGUIContainer-TreeGroup.lua:525
border = <unnamed> {}
EnableButtonTooltips = <func> @ButtonTimers\Libs\..\widgets\AceGUIContainer-TreeGroup.lua:316
tree = <table> {}
dragger = <unnamed> {}
userdata = <table> {}
width = "fill"
SetLabel = <func> @ArbitraryCommands\AceGUIContainer-TreeGroupFakeInput.lua:4
SetDisabled = <func> @ArbitraryCommands\LibFarmbuyer.lua:236
SetStatusTable = <func> @ButtonTimers\Libs\..\widgets\AceGUIContainer-TreeGroup.lua:341
LayoutFunc = <func> @Titan\libs\..\AceGUI-3.0.lua:629
OnHeightSet = <func> @ButtonTimers\Libs\..\widgets\AceGUIContainer-TreeGroup.lua:565
type = "TreeGroup"
BuildLevel = <func> @ButtonTimers\Libs\..\widgets\AceGUIContainer-TreeGroup.lua:370
buttons = <table> {}
base = <table> {}
children = <table> {}
GetTreeWidth = <func> @ButtonTimers\Libs\..\widgets\AceGUIContainer-TreeGroup.lua:600
treeframe = <unnamed> {}
hasChildren = <table> {}
events = <table> {}
filter = false
OnAcquire = <func> @ButtonTimers\Libs\..\widgets\AceGUIContainer-TreeGroup.lua:295
frame = <unnamed> {}
ShowScroll = <func> @ButtonTimers\Libs\..\widgets\AceGUIContainer-TreeGroup.lua:529
SetSelected = <func> @ButtonTimers\Libs\..\widgets\AceGUIContainer-TreeGroup.lua:500
}
status = <table> {
groups = <table> {}
scrollvalue = 13.476644515991
fullwidth = 764.0000927331
treesizable = true
treewidth = 175
selected = "userscriptsraidsThrone of ThunderThrone of Thunder 2"
}
AceGUI = <table> {
objPools = <table> {}
RegisterAsContainer = <func> @Titan\libs\..\AceGUI-3.0.lua:521
RegisterWidgetType = <func> @Titan\libs\..\AceGUI-3.0.lua:559
WidgetBase = <table> {}
RegisterAsWidget = <func> @Titan\libs\..\AceGUI-3.0.lua:537
counts = <table> {}
LayoutRegistry
Hi there, I just recently got sick and tired of macros limitations and here I am :).
Anywho when I use the 'SLASH(msg)' with msg being say "/2 wtb" the chat input will be stickied to /2 for the next message I try to type using non-script (aka enter , type , enter). Slight annoyance but I guess I'm not the only one that has noticed :)
Awaiting reply!
@Colraw: Funky. I think I know what's doing that. I'll try to find a workaround next time I'm home. Thanks for the notice!
@macknik: Should be fixed, or at least avoided, in 0.7.1. Sorry it took so long, haven't been online for a while. Thanks for reporting this!
I'm getting the following bug on login if Arbitrary Commands is enabled. (All other addons disabled.)
Message: Interface\AddOns\ArbitraryCommands\ac.lua:754: attempt to index field '?' (a nil value)
Time: Wed Nov 28 07:23:07 2012
Count: 1
Stack: Interface\AddOns\ArbitraryCommands\ac.lua:754: in main chunk
Locals: nametag = "ArbitraryCommands"
addon = <table> {
defaults = <table> {
}
Enable = <function> defined @Interface\AddOns\ArbitraryCommands\libs\AceAddon-3.0\AceAddon-3.0.lua:315
RegisterChatCommand = <function> defined @Interface\AddOns\ArbitraryCommands\libs\AceConsole-3.0\AceConsole-3.0.lua:85
EnableModule = <function> defined @Interface\AddOns\ArbitraryCommands\libs\AceAddon-3.0\AceAddon-3.0.lua:348
modules = <table> {
}
GetModule = <function> defined @Interface\AddOns\ArbitraryCommands\libs\AceAddon-3.0\AceAddon-3.0.lua:231
IterateEmbeds = <function> defined @Interface\AddOns\ArbitraryCommands\libs\AceAddon-3.0\AceAddon-3.0.lua:458
OnChatCommand = <function> defined @Interface\AddOns\ArbitraryCommands\ac.lua:341
defaultModuleLibraries = <table> {
}
gen_submenu = <function> defined @Interface\AddOns\ArbitraryCommands\ac.lua:534
getparent = <function> defined @Interface\AddOns\ArbitraryCommands\ac.lua:349
UnregisterChatCommand = <function> defined @Interface\AddOns\ArbitraryCommands\libs\AceConsole-3.0\AceConsole-3.0.lua:111
RegisterCommand = <function> defined @Interface\AddOns\ArbitraryCommands\ac.lua:682
options = <table> {
}
Printf = <function> defined @Interface\AddOns\ArbitraryCommands\libs\AceConsole-3.0\AceConsole-3.0.lua:69
SetDefaultModulePrototype = <function> defined @Interface\AddOns\ArbitraryCommands\libs\AceAddon-3.0\AceAddon-3.0.lua:425
name = "ArbitraryCommands"
ClearCommands = <function> defined @Interface\AddOns\ArbitraryCommands\ac.lua:655
IsEnabled = <function> defined @Interface\AddOns\ArbitraryCommands\libs\AceAddon-3.0\AceAddon-3.0.lua:467
orderedModules = <table> {
}
RegisterMenu = <function> defined @Interface\AddOns\ArbitraryCommands\ac.lua:660
DisableModule = <function> defined @Interface\AddOns\ArbitraryCommands\libs\AceAddon-3.0\AceAddon-3.0.lua:366
GetOption = <function> defined @Interface\AddOns\ArbitraryCommands\ac.lua:215
BackRegister = <function> defined @Interface\AddOns\ArbitraryCommands\ac.lua:728
RefreshConfig = <function> defined @Interface\AddOns\ArbitraryCommands\ac.lua:554
get_menu_offset = <function> defined @Interface\AddOns\ArbitraryCommands\ac.lua:395
SetDefaultModuleLibraries = <function> defined @Interface\AddOns\ArbitraryCommands\libs\AceAddon-3.0\AceAddon-3.0.lua:383
GetArgs = <function> defined @Interface\AddOns\ArbitraryCommands\libs\AceConsole-3.0\AceConsole-3.0.lua:144
Print = <function> defined @Interface\AddOns\ArbitraryCommands\libs\AceConsole-3.0\AceConsole-3.0.lua:54
KEYSEP = " "
gen_tree_entry = <function> defined @Interface\AddOns\ArbitraryCommands\ac.lua:528
gen_menu_entry = <function> defined @Interface\AddOns\ArbitraryCommands\ac.lua:516
static_script_tree = <table> {
}
IsModule = <function> defined @Interface\AddOns\ArbitraryCommands\libs\AceAddon-3.0\AceAddon-3.0.lua:484
SetOption = <function> defined @Interface\AddOns\ArbitraryCommands\ac.lua:207
SetDefaultModuleState = <function> defined @Interface\AddOns\ArbitraryCommands\libs\AceAddon-3.0\AceAddon-3.0.lua:403
GetMenuLocations = <function> defined @Interface\AddOns\ArbitraryCommands\ac.lua:334
find = <function> defined @Interface\AddOns\ArbitraryCommands\ac.lua:428
SetEnabledState = <function> defined @Interface\AddOns\ArbitraryCommands\libs\AceAddon-3.0\AceAddon-3.0.lua:440
get_submenu = <function> defined @Interface\AddOns\ArbitraryCommands\ac.lua:403
enabledState = true
RunScript = <function> defined @Interface\AddOns\ArbitraryCommands\ac.lua:609
added_menu_name_map = <table> {
}
populate_data_tables = <function> defined @Interface\AddOns\ArbitraryCommands\ac.lua:490
ToggleEnable = <function> defined @Interface\AddOns\ArbitraryCommands\ac.lua:321
OnDisable = <function> defined @Interface\AddOns\ArbitraryCommands\ac.lua:315
OnEnable = <function>
Hmm, now all we need is an example of how to link to dungeon journal elements (phases, not just spells). And a catalog of the dungeon journal entries.
IRC helped me figure it out. My research is here
https://github.com/mutantbob/wow-fight-explanations
https://docs.google.com/document/d/1nTGFNxaq8naYY0waAiTHr1T_w0ZP5m-hAN0xaD8uOkQ/edit
Any chance for a 5.0.4 update?
I knew I was forgetting something. Done!
To the author: thank you for fixing the message I reported on Aug 8, 2011.
Look this addon: http://www.wowinterface.com/downloads/fileinfo.php?id=16052#info
Arbitrary Command and MuchMoreMacro could be a single powerful addon.
Aniway a way to bind some scripts to the keyboard wil be useful. Tnx :-)
In the chat window, I'm seeing the following when I click on any script that I've made that runs slash commands.
Error SCRIPTNAME:
Interface\FrameXML\ChatFrame.lua:4062: attempt to index local 'button' (a nil value)
By the way, I really enjoy using your addon.
4x FrameXML\ChatFrame.lua:3573: attempt to index field "header" (a nil value)
FrameXML\ChatFrame.lua:3573: in function <FrameXML\ChatFrame.lua:3567>
FrameXML\ChatFrame.lua:3593: in function "ChatEdit_DeactivateChat"
FrameXML\ChatFrame.lua:3894: in function "ChatEdit_OnEscapePressed"
FrameXML\ChatFrame.lua:4223: in function "ChatEdit_ParseText"
FrameXML\ChatFrame.lua:3832: in function "ChatEdit_SendText"
ArbitraryCommands-beta-2.1\ac.lua:616: in function "RunScript"
ArbitraryCommands-beta-2.1\ac.lua:514: in function "func"
FrameXML\UIDropDownMenu.lua:638: in function "UIDropDownMenuButton_OnClick"
<string>:"*:OnClick":1: in function <string>:"*:OnClick":1
This apparently happens if your primary chat window is using IM style rather than Classic style. Should be fixed in beta-3.