Re: [tw5] Storing the result of a macro in raw form and pass it to a tiddler text field

2019-02-22 Thread Mohammad
Jeremy, I tested your solution and it works, BUT, this is true if utility macro itself contains wikitext like example above. If utility itself call other macro or have some scripts, then it will fail, look at the below case \define mac2(p) {{{ [<__p__>split[]addprefix[c]] }}} \define utility(a

Re: [tw5] Storing the result of a macro in raw form and pass it to a tiddler text field

2019-02-22 Thread Mohammad
Hi Tony! Thank you! Yes, it would make life much easier! --Mohammad On Saturday, February 23, 2019 at 1:23:42 AM UTC+3:30, TonyM wrote: > > Mohammad, > > I think Jeremy is suggesting storing the macro output in a variable as a > future feature. This is a bit like allowing us to pipe the output

Re: [tw5] Storing the result of a macro in raw form and pass it to a tiddler text field

2019-02-22 Thread TonyM
Mohammad, I think Jeremy is suggesting storing the macro output in a variable as a future feature. This is a bit like allowing us to pipe the output of one macro into another. I think this would be helpful, and would make some solutions much easier to code. I would love to find a way to store

Re: [tw5] Storing the result of a macro in raw form and pass it to a tiddler text field

2019-02-22 Thread Mohammad
Thank you Jeremy! Lets see how can I use your solution in my case and I return to you by me results. By the way I am curious about the last paragraph of your reply: An alternate solution that might be useful would be an alternate mode to > the <$macrocall> widget whereby it makes the result of

Re: [tw5] Storing the result of a macro in raw form and pass it to a tiddler text field

2019-02-22 Thread Jeremy Ruston
Hi Mohammad Thanks that’s great. I think the button is actually a red herring, and you can see the same behaviour with this simplified version: \define utility(a, b) This is //$a$// and ''$b$''. \define test(tidName, v1, v2) <$wikify name="newText" text="""<$macrocall $name="utility" a=<<__v

Re: [tw5] Storing the result of a macro in raw form and pass it to a tiddler text field

2019-02-21 Thread Mohammad
Hi Jeremy, I tried to reproduce a simple example though may seem meaningless. \define utility(a, b) This is //$a$// and ''$b$''. \define test(tidName, v1, v2) <$wikify name="newText" text="""<$macrocall $name="utility" a=<<__v1__>> b=<<__v2__>> />"""> <$action-setfield $tiddler="""$tidName$""

Re: [tw5] Storing the result of a macro in raw form and pass it to a tiddler text field

2019-02-21 Thread Jeremy Ruston
Hi Mohammad Please could you post a complete example? Many thanks, Jeremy > On 21 Feb 2019, at 14:06, Mohammad wrote: > > > One way to store the result of a macro has some parameters is to store it in > wikified variable as below > > > Example > See the below code extracted from a longer

[tw5] Storing the result of a macro in raw form and pass it to a tiddler text field

2019-02-21 Thread Mohammad
One way to store the result of a macro has some parameters is to store it in wikified variable as below Example See the below code extracted from a longer code. This works correctly. It calls utility, and save the results in newText and then the action-setfield passes it to a tiddler as its t