I have been tweaking some of my macros and wanted to use the emote (/me) command, but I can't figure out a way and after reading the wiki I am not sure that this is even possible.
Here is some older code I was playing with...
Code: Select all
[h: token= getName()]
[h: ind = getMacroButtonIndex()]
[h: props = getMacroProps(ind)]
[h: SPELL_NAME = getStrProp(props, "label")]
[h:isUsed = if(getStrProp(props, "color") == "gray", 1, 0)]
[r, if(isUsed), code: {[macro("Used Spell@Lib:Darke"):"token ="+token] }; {
[r: token] casts a spell... [gm, s: SPELL_NAME]<br>
<!--- enter spell stats here --->
<!--- This next command creates a link to the spell description page --->
<a href="http://www.d20pfsrd.com/magic/all-spells/f/feather-fall">[gm, s: "Spell Description"]</a> <br>
[h: setMacroProps(ind,"color=gray")]
}]
Code: Select all
[r: token] casts a spell... [gm, s: SPELL_NAME]<br>
Code: Select all
/me casts a spell...
I have tried putting the emote command in a separate macro called chat and use the macro functions. If you clcik the chat macro you get the result you want. Calling the macro via evalMacro prints out the contents of "chat" to the chat box. execMacro gives the same error as the eval function.
[r: evalMacro(" [macro("chat@this"): ""] ") ]
[r: execMacro(" [macro("chat@this"): ""] ") ]
Suggestions welcome.