Download
(37Kb)
Download
Updated: 09-24-09 06:53 PM
Pictures
File Info
Updated:09-24-09 06:53 PM
Created:02-21-09 07:08 PM
Downloads:3,280
Favorites:54
MD5:

Macro Broker

Version: 0.15
by: Tuhljin [More]

Ever wanted a simple data broker plugin? One that does something a macro might do? Like open the calendar, toggle whether your cloak or helm is shown, or perhaps open a window provided by one of your favorite addons? There's no need to go through the hassle of coding it yourself or wait for another to do the work for you - just use Macro Broker.

Macro Broker uses an interface much like that of the standard macro UI. (See the screenshot.) To access the Macro Broker window, use one of these slash commands: /macrobroker, /broker, or /mb.

Broker macros work much like standard WoW macros, running a set of commands when clicked. All the standard conditionals - such as [mod], [flying], [combat], or [button:1] - are supported, as are #show and #showtooltip.

Additionally, the slash command /eval (alias /ev) is included to allow you to use macro-style conditionals with commands that don't normally allow them. /eval can be used wherever slash commands are viable, including both broker macros and your standard macros. See the screenshot or the included eval.lua file for example usage.

However, broker macros and the /eval command cannot execute secure commands, so things like /cast or /target are out of bounds, with a couple of important exceptions. First, /stopmacro is allowed, as Macro Broker will handle that command itself. Second, /cast can be used with tradeskill "spells" such as Engineering or Blacksmithing.



Click here to lend your support!
Buy Tuhljin a snack so he'll feel guilty about not yet implementing that suggestion you made. Or maybe just to show your support. That works, too.

v0.15
- Fixed an error that could occur on startup when checking saved variables.
- The tooltip of items and spells are no longer shown unless #showtooltip is used in the first line of the macro.

v0.14
- Updated for WoW 3.2.
- Dynamic icons are now supported. Broker macros using the "?" option now have their icons determined by the contents of the macro body, just as normal WoW macros do, making use of #show, #showtooltip, and what is being /cast or /used, including checking for conditionals like [mod], [flying], [combat], etc.
- Conditionals can now be used with /cast commands (but they still can only be used to cast tradeskill spells like Engineering).
- Plugins can now use #showtooltip to determine the contents of their tooltips, similar to normal WoW macros.
- The "Created by Macro Broker" tag placed in tooltips has been removed. (An option to enable it may be added in a future release.)

v0.13
- You can now rename broker macros using the GUI. Changes won't take effect until the interface is reloaded.
- The /cast command may now be used in broker macros with tradeskill spells (e.g. "Engineering") as long as no conditionals (e.g. "[mod]") are used.

v0.12
- Initial release.
Optional Files (0)


Post A Reply Comment Options
Unread 11-06-10, 01:09 AM  
baldricinoz
A Kobold Labourer

Forum posts: 0
File comments: 16
Uploads: 0
Hi Tuhljin,

This addon seems to be broken as at 4.0.1. The add new macro function no longer works - no icons appear in the selection dialog, thus the save button remains disabled.

Also generates the following error:

Code:
1x MacroBrokerGUI-0.15\MacroBrokerGUI.lua:395: attempt to perform arithmetic on local 'MacroBrokerGUI_IconPopupOffset' (a nil value)
MacroBrokerGUI-0.15\MacroBrokerGUI.lua:316: in function `IconPopupFrame_OnShow'
<string>:"*:OnShow":1: in function <[string "*:OnShow"]:1>
<in C code>: in function `Show'
MacroBrokerGUI-0.15\MacroBrokerGUI.lua:241: in function `NewButton_OnClick'
<string>:"*:OnClick":1: in function <[string "*:OnClick"]:1>

Locals:
self = MacroBrokerGUI_IconPopupFrame {
 0 = <userdata>
 mode = "new"
 selectedIconTexture = "Interface\Icons\Ability_Rogue_BloodyEye"
}
NUM_MACRO_ICONS_SHOWN = 20
NUM_ICONS_PER_ROW = 5
MacroBrokerGUI = <table> {
 IconPopupFrame_OnHide = <function> @ MacroBrokerGUI\MacroBrokerGUI.lua:334:
 IconPopupFrame_OnShow = <function> @ MacroBrokerGUI\MacroBrokerGUI.lua:298:
 IconPopupOkayButton_OnClick = <function> @ MacroBrokerGUI\MacroBrokerGUI.lua:445:
 Update = <function> @ MacroBrokerGUI\MacroBrokerGUI.lua:120:
 IconPopupButton_SelectTexture = <function> @ MacroBrokerGUI\MacroBrokerGUI.lua:429:
 IconPopupButton_OnClick = <function> @ MacroBrokerGUI\MacroBrokerGUI.lua:441:
 IconPopupFrame_Update = <function> @ MacroBrokerGUI\MacroBrokerGUI.lua:356:
 OnTextChanged = <function> @ MacroBrokerGUI\MacroBrokerGUI.lua:588:
 ToggleDeleteMacro = <function> @ MacroBrokerGUI\MacroBrokerGUI.lua:500:
 AddMacroLine = <function> @ MacroBrokerGUI\MacroBrokerGUI.lua:220:
 IconPopupOkayButton_Update = <function> @ MacroBrokerGUI\MacroBrokerGUI.lua:420:
 EditBox_HandleTabbing = <function> @ MacroBrokerGUI\MacroBrokerGUI.lua:522:
 EditButton_OnClick = <function> @ MacroBrokerGUI\MacroBrokerGUI.lua:244:
 SetCharacterMacros = <function> @ MacroBrokerGUI\MacroBrokerGUI.lua:110:
 SelectMacro = <function> @ MacroBrokerGUI\MacroBrokerGUI.lua:234:
 OnShow = <function> @ MacroBrokerGUI\MacroBrokerGUI.lua:89:
 OnLoad = <function> @ MacroBrokerGUI\MacroBrokerGUI.lua:76:
 OnHide = <function> @ MacroBrokerGUI\MacroBrokerGUI.lua:94:
 LDBFieldEditBoxChanged = <function> @ MacroBrokerGUI\MacroBrokerGUI.lua:513:
 NewButton_OnClick = <function> @ MacroBrokerGUI\MacroBrokerGUI.lua:238:
 MacroButton_OnClick = <function> @ MacroBrokerGUI\MacroBrokerGUI.lua:226:
 Show = <function> @ MacroBrokerGUI\MacroBrokerGUI.lua:72:
 SaveMacro = <function> @ MacroBrokerGUI\MacroBrokerGUI.lua:493:
 OnCursorChanged = <function> @ MacroBrokerGUI\MacroBrokerGUI.lua:610:
 IconPopupFrame_CancelEdit = <function> @ MacroBrokerGUI\MacroBrokerGUI.lua:415:
 SetAccountMacros = <function> @ MacroBrokerGUI\MacroBrokerGUI.lua:100:
 HideDetails = <function> @ MacroBrokerGUI\MacroBrokerGUI.lua:252:
 MacroButtonContainer_OnLoad = <function> @ MacroBrokerGUI\MacroBrokerGUI.lua:282:
 ShowDetails = <function> @ MacroBrokerGUI\MacroBrokerGUI.lua:267:
}
Last edited by baldricinoz : 11-06-10 at 01:23 AM.
Report comment to moderator  
Reply With Quote
Unread 10-19-10, 07:38 PM  
Taigen
A Defias Bandit
 
Taigen's Avatar

Forum posts: 3
File comments: 82
Uploads: 0
This was one amazing addon. I hope there is an update for 4.0.1. and beyond.

I miss this mod =/
Last edited by Taigen : 10-27-10 at 01:13 PM.
Report comment to moderator  
Reply With Quote
Unread 07-04-10, 11:58 PM  
Marhu
A Kobold Labourer

Forum posts: 0
File comments: 1
Uploads: 0
edit

Interface\AddOns\MacroBroker\libs\TjRunSlash.lua
101 editbox = editbox or ChatFrameEditBox
to
101 editbox = editbox or ChatFrame1EditBox
Reply Delete Ban User Report Permalink
Report comment to moderator  
Reply With Quote
Unread 07-03-10, 09:14 AM  
slickwalker
A Deviate Faerie Dragon
 
slickwalker's Avatar

Forum posts: 18
File comments: 155
Uploads: 0
This seems to be broken with the latest patch, either that or it's compatibility with Dockingstation has changed.
Report comment to moderator  
Reply With Quote
Unread 02-24-09, 12:48 PM  
Tuhljin
A Flamescale Wyrmkin
 
Tuhljin's Avatar
AddOn Author - Click to view AddOns

Forum posts: 106
File comments: 233
Uploads: 10
Originally posted by xtoq
Is there any way to edit the lua to put the "text" field into the tooltip, similar to how you removed the footer for the poster below?
Well, the quick way would be to find this line:
Code:
local tiptext = info.tiptext
and change it to:
Code:
local tiptext = info.tiptext or dataobj.text
Report comment to moderator  
Reply With Quote
Unread 02-24-09, 12:11 PM  
xtoq
An Aku'mai Servant
 
xtoq's Avatar
AddOn Author - Click to view AddOns

Forum posts: 32
File comments: 642
Uploads: 4
Originally posted by Tuhljin
This isn't supported by the UI yet but may be in a future version. As for what the label and text fields do, exactly how that information is used is determined by your LDB display addon.
Yeah, they display the information, just in the display field itself. I just want to be able to add a tooltip that says "Click for [action] and Right Click for [action]." Is there any way to edit the lua to put the "text" field into the tooltip, similar to how you removed the footer for the poster below?

Great addon though, cleans up my macro space.
Last edited by xtoq : 02-24-09 at 12:15 PM.
Report comment to moderator  
Reply With Quote
Unread 02-23-09, 08:45 PM  
Tuhljin
A Flamescale Wyrmkin
 
Tuhljin's Avatar
AddOn Author - Click to view AddOns

Forum posts: 106
File comments: 233
Uploads: 10
Originally posted by xtoq
How would I go about writing my own tooltip? Nothing I put in the text fields (except Name) shows up there, even putting one in like your screenshot.
This isn't supported by the UI yet but may be in a future version. As for what the label and text fields do, exactly how that information is used is determined by your LDB display addon.
Report comment to moderator  
Reply With Quote
Unread 02-23-09, 08:31 PM  
xtoq
An Aku'mai Servant
 
xtoq's Avatar
AddOn Author - Click to view AddOns

Forum posts: 32
File comments: 642
Uploads: 4
How would I go about writing my own tooltip? Nothing I put in the text fields (except Name) shows up there, even putting one in like your screenshot.
Report comment to moderator  
Reply With Quote
Unread 02-23-09, 02:55 PM  
Sec
A Cyclonian
 
Sec's Avatar

Forum posts: 48
File comments: 177
Uploads: 0
Originally posted by Tuhljin
Sure. The core addon is actually quite a bit more powerful than the GUI would lead you to believe, but until the UI catches up with it, you'll have to manually edit the code to use the advanced features.

In this case, open core.lua and find this line:
Code:
return dataobj, t
Insert this just above it:
Code:
OBJINFO[dataobj].notip_footer = true
Thank you very much! I'm looking forward to future improvements.
Report comment to moderator  
Reply With Quote
Unread 02-22-09, 06:30 PM  
Tuhljin
A Flamescale Wyrmkin
 
Tuhljin's Avatar
AddOn Author - Click to view AddOns

Forum posts: 106
File comments: 233
Uploads: 10
Originally posted by Sec
Brilliant addon! Also, thanks for for cloak and helm example.

Is it possible for the "Created by Macro Broker" text to be hidden?
Sure. The core addon is actually quite a bit more powerful than the GUI would lead you to believe, but until the UI catches up with it, you'll have to manually edit the code to use the advanced features.

In this case, open core.lua and find this line:
Code:
return dataobj, t
Insert this just above it:
Code:
OBJINFO[dataobj].notip_footer = true
Report comment to moderator  
Reply With Quote
Unread 02-22-09, 07:54 AM  
Sec
A Cyclonian
 
Sec's Avatar

Forum posts: 48
File comments: 177
Uploads: 0
Brilliant addon! Also, thanks for for cloak and helm example.

Is it possible for the "Created by Macro Broker" text to be hidden?
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump:

Support AddOn Development!

You have just downloaded by the author . If you like this AddOn why not consider supporting the author? This author has set up a donation account. Donations ensure that authors can continue to develop useful tools for everyone.