Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Macro with dynamic text?

Hi all, I am looking for a way to prompt the user for some text, then use that text in the macro.  The simplest example I can think of would be like this. Chat Command invokes macro: #attack Edit Box shows up and I type in  [Joe] And the macro spits out /desc The dwarf attacks you $string. The dwarf attacks you Joe. I know the example is dumb, but I think it shows what I am shooting to do.  Thanks in advance
<a href="https://wiki.roll20.net/Roll_Query" rel="nofollow">https://wiki.roll20.net/Roll_Query</a> /desc The dwarf attacks you ?{Name?}
Thanks for Reply, I do appreciate it. I dont think it covers what I am trying to do though, I want a macro that I send text to, that will spit it back out to chat.&nbsp; I don't want to have to type /desc, I want to be able to call a macro. So something like: #trance Edit box pops up&nbsp;&nbsp; [John] /desc And so $string1 falls into a ~~slumber~~. or maybe I dont need an edit box, maybe I can just do #trance John ???
1683646686

Edited 1683646714
Just create a macro with that code in it. #Trance has the code: /desc And so ?{Name?} falls into a ~~slumber~~. Typing #Trance into chat brings up the input box. Typing John and pressing submit outputs "And so John falls into a ~~slumber~~" into the chat window in a description template.
On my macro bar I have "Whisper" to speed that process up a bit as I like to trim my input as much as possible.&nbsp; Clicking it makes me select the appropriate token and then pops up an input box, I type my message and it whispers to that token: /w @{Target|token_name} ?{msg} Obviously you don't need to make it a whisper...
Jarren said: Just create a macro with that code in it. #Trance has the code: /desc And so ?{Name?} falls into a ~~slumber~~. Typing #Trance into chat brings up the input box. Typing John and pressing submit outputs "And so John falls into a ~~slumber~~" into the chat window in a description template. I think this is what I was looking for.&nbsp; Thanks for all the replies, I learn so much from this forum.&nbsp;&nbsp; My master plan isnt quite complete yet...&nbsp; I am trying to put that text in a HTML output. /desc [?{TextHere}] (#" style="color:blue) But it just dumps it to chat without parsing it... is there a magic trick to make it parse correctly? [test] (#" style="color:blue)
You cannot have a space between the closing bracket and opening parenthesis: Bad:&nbsp; /desc [?{TextHere}] (#" style="color:blue) Good:&nbsp; /desc [?{TextHere}](#" style="color:blue)
Jarren said: You cannot have a space between the closing bracket and opening parenthesis: Bad:&nbsp; /desc [?{TextHere}] (#" style="color:blue) Good:&nbsp; /desc [?{TextHere}](#" style="color:blue) thanks !