Anyone know if these are not supposed to work any more, or if it is a bug?
make a macro with /click in it, and then /cast after. The /click is ignored.
Not a bug, macro clicking has changed
1 Like
Curious, is it in the patch notes somewhere?
1 Like
Not that I’m aware of nor expect to be made available. There are links to author disussions on the topic in other threads in this fourm that might provide some enlightenment if not relief on where we ended up.
Here’s a discussion about the macro system changes in 11.0, from the github where several addon authors collaborate to track API changes.
opened 04:14PM - 18 Apr 24 UTC
closed 02:09AM - 03 Jul 24 UTC
Mainline Beta
Feedback
High Priority
In the initial alpha build of 11.0.0, the "macrotext" secure attribute appears t… o have been removed from the macro action available to secure action buttons.
The removal of this functionality has a wide-ranging impact that will negatively impact users quite significantly, primarily over concerns with the limitations of the built-in macro system.
This ticket is intended to collect a few examples of use cases that will be broken to see if improvements can be made for end-users, or for certain functionalities to be added to the API to restore parts of what has been broken.
### Macro limits are too low
One common point of feedback so far is that both the length limit of individual macros (255 characters) and the number of available macro slots is considered to be extremely limiting. Addons such as [Clique](<https://www.curseforge.com/wow/addons/clique>) and [MacroToolkit](<https://www.curseforge.com/wow/addons/macro-toolkit>) which extensively make use of the "macrotext" attribute to allow macros to be bound directly to keypresses or unitframe clicks without consuming precious macro slots.
Increasing both the number of available character and account-wide macro slots, as well as bumping macros to natively support 1023 characters matching what RunMacroText actually supports would be helpful and may mitigate some common uses of the macrotext attribute.
### Item processing and other out-of-combat usages
A number of addons use macrotext for tasks such as item processing. Typically this takes the form of a `/cast <spell>` followed by a `/use <item>`. In some cases these can be replaced by proper use of the "target-bag"/"target-slot"/"target-item" attributes, but there's allegedly a few use-cases where these item-targetting attributes aren't suitable.
Additionally, for roleplayers addons such as [Total RP 3 Extended](https://www.curseforge.com/wow/addons/total-rp-3-extended) provide the ability to create custom items that may execute macro texts on a click, which makes it very easy for users to have an item that performs an emote for example. Our use case here is strictly out-of-combat, and we're not keen on the alternative idea of allowing unrestricted loadstring access to users as a replacement.
All of these cases could be made to continue working in 11.0 unaltered if the "macrotext" attribute were re-added, **but limited to only ever working while out-of-combat**. Conceptually this is a bit similar to InsecureActionButtonTemplate, which allows delegated execution of secure actions on click but only while out-of-combat.
### Some slash commands have no secure action equivalents
A few common examples that I've seen so far are `/clearfocus` and `/targetexact` - neither of these seems to be directly possible with the existing attribute system available to SecureActionButtonTemplate.
There's also cases of command sequences that aren't trivially replicated without the use of macrotext - for example, `/cleartarget` followed by `/target somethingelse`, or casting/using multiple spells or items back-to-back where one doesn't trigger a global cooldown.
In general - it would be wise to do a pass over SecureCmdList and see what makes sense to bring over to secure actions.
### Built-in macro conditions are extremely limited
The client doesn't support a lot of macro conditions natively, and the availability of certain conditions like `[known:spell]` isn't consistent between client flavors. A general resolution for this use case is proposed in #554.
### Concerns over macro slot reservations
The removal of this functionality may incentivize addons to "reserve" proper macro slots for their own functions, which would be a significant annoyance for users.
It wouldn't be surprising if the macro APIs need restricting to prevent this from happening, but that would then also wipe out any form of macro management addons that for example save and load macro sets based upon factors such as what instance you're in, or what class you're playing.
The discussion is primarily about the ability for an addon to create a macro “on-the-fly” and execute it, but here’s the relevant bullet point for this topic:
All macros (both real and “macrotext” based ones) are being additionally restricted to remove the ability to chain macros. For example, this means that one macro cannot “/click” a button that itself would execute another macro.
Emphasis added.
The devs are intentionally removing macro chaining.
3 Likes
So that does that include mouse over macros like this?
/run C_PetJournal.CagePetByID(GetMouseFocus().petID)
The above deals with /click specifically.
Almost anything that can be done with a /run is unaffected. But in your macro’s case, 11.0 broke it another way you need to use GetMouseFoci()[1].petID instead of GetMacroFocus().petID:
/run C_PetJournal.CagePetByID(GetMouseFoci()[1].petID)
3 Likes
This makes me a sad panda.
Seriously, this is changing like 99.9% of all my macros, which I’ve developed since Vanilla…