Open main menu
Home
Random
Log in
Settings
About AddOn Studio
Disclaimers
AddOn Studio
Search
Editing
WoW:API SecureCmdOptionParse
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{wowapi}} __NOTOC__ Evaluates macro options in the string and returns the appropriate sub-string or nil result, target = SecureCmdOptionParse("macroText") == Arguments == ;macroText : a string containing the macro conditions to be parsed. == Returns == ;result : The chosen clause text, or no return (nil) if none of the clauses apply. ;target : The [target=(unit)] argument of the chosen clause, if such an argument exist. == Example == print(SecureCmdOptionParse("[mod:alt] Alt is down; Alt is not down")); -- Prints appropriate text print(SecureCmdOptionParse("[target=pet] Cast at Pet")); -- Prints 'Cast at Pet', 'pet' print(SecureCmdOptionParse("[nomod,mod] Alt is not down")); -- Prints nothing (nomod and mod cannot both be true) == Details == This command can be used to implement the same conditional processing that Blizzard's macro system uses. It is the same API they use and so supports all the same conditionals. Note that item links can not be part of the commands because they contain square brackets [], which get interpreted by the parser as modifiers.
Summary:
Please note that all contributions to AddOn Studio are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
AddOn Studio Wiki:Copyrights
for details).
Submissions must be written by you, or copied from a public domain or similar free resource (see
AddOn Studio Wiki:Copyrights
for details).
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Apinav
(
edit
)
Template:Editlink
(
edit
)
Template:Tocright
(
edit
)
Template:Wowapi
(
edit
)