Macro to alter /emit
Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice
- JonathanTheBlack
- Dragon
- Posts: 544
- Joined: Mon Jun 28, 2010 12:12 pm
- Location: I'm the worm...
Macro to alter /emit
I'm trying to create a macro to alter the properties of /emit, and use an input box/dialog to enter the text, but is there a way to use a larger text box other than just one line?
Re: Macro to alter /emit
Not without using a different approach.
If you use a dialog for input, with a textarea as part of an HTML form, then you can have multi-line input. There are a few examples in the user creations forum. The biggest difference is that dialog doe not interrupt macro execution (unlike the Wiki: input() function), and you have to have a processing macro to which the html form is submitted, that does something with the input. Different model, but you can accomplish much the same thing.
Keep in mind that /emit and other "slash commands" are tricky to use in macros: they have to be the very first thing in a macro, and that macro can not be called by another macro (so the slash command must be the first thing in a macro chain). Otherwise, they won't work.
Unless, you want to 'fake' the emit function, which shouldn't be too hard and probably safer and even more powerful overall.
If you use a dialog for input, with a textarea as part of an HTML form, then you can have multi-line input. There are a few examples in the user creations forum. The biggest difference is that dialog doe not interrupt macro execution (unlike the Wiki: input() function), and you have to have a processing macro to which the html form is submitted, that does something with the input. Different model, but you can accomplish much the same thing.
Keep in mind that /emit and other "slash commands" are tricky to use in macros: they have to be the very first thing in a macro, and that macro can not be called by another macro (so the slash command must be the first thing in a macro chain). Otherwise, they won't work.
Unless, you want to 'fake' the emit function, which shouldn't be too hard and probably safer and even more powerful overall.
"The trouble with communicating is believing you have achieved it"
[ d20 StatBlock Importer ] [ Batch Edit Macros ] [ Canned Speech UI ] [ Lib: Math ]
[ d20 StatBlock Importer ] [ Batch Edit Macros ] [ Canned Speech UI ] [ Lib: Math ]
Re: Macro to alter /emit
And you can see an example of how to do it if you look at the code for Rumble's Speak For Me tool.biodude wrote:Unless, you want to 'fake' the emit function, which shouldn't be too hard and probably safer and even more powerful overall.
"Fairy tales do not tell children the dragons exist. Children already know that dragons exist. Fairy tales tell children the dragons can be killed."
- G. K. Chesterton
Wonderful HTML/CSS reference * Color Manager * Token Manager 2.0
- G. K. Chesterton
Wonderful HTML/CSS reference * Color Manager * Token Manager 2.0