[tw] Re: [TW5] Need help with TW5-script

2016-03-29 Thread Knut Franke
On Saturday, March 26, 2016 at 12:10:03 AM UTC+1, Mark S. wrote: > > I'm still very confused about all this. If all that a macro does is > substitution, how does it help to put everything inside of the macro? > You're not alone. As Eric pointed out, you basically use macros to trigger some

[tw] Re: [TW5] Need help with TW5-script

2016-03-25 Thread Eric Shulman
On Friday, March 25, 2016 at 4:10:03 PM UTC-7, Mark S. wrote: > > Hi Eric, > > That seems to be the final tweak. I put the triple quotes in (not BJ) > before I realized that the name/argument were mismatched. I fixed the > mismatch, but should have removed the quotes. > > I'm still very confused

[tw] Re: [TW5] Need help with TW5-script

2016-03-25 Thread 'Mark S.' via TiddlyWiki
Hi Eric, That seems to be the final tweak. I put the triple quotes in (not BJ) before I realized that the name/argument were mismatched. I fixed the mismatch, but should have removed the quotes. I'm still very confused about all this. If all that a macro does is substitution, how does it

[tw] Re: [TW5] Need help with TW5-script

2016-03-25 Thread Eric Shulman
On Friday, March 25, 2016 at 2:53:48 PM UTC-7, Mark S. wrote: > > <$macrocall $name="amacro" x="""{{$:/html2tw/title}}"""/> > > Maybe some other tweak? > should be: <$macrocall $name="amacro" x={{$:/html2tw/title}}/> e.g., remove the tripled-quotes so that the parameter retrieves the value

[tw] Re: [TW5] Need help with TW5-script

2016-03-25 Thread Mat
Could be more problems but one is it should probably read: <$set name="name_of_tiddler" value="$x$"> i.e with quotes around $x$. Maybe even """$x$""". <:-) -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop

[tw] Re: [TW5] Need help with TW5-script

2016-03-25 Thread 'Mark S.' via TiddlyWiki
Thanks BJ. I had great hopes for this approach. But in this case, <> is empty and doesn't even show up when dropped in ... as shown below. I had to tweak your suggested code to match up parameter and argument names. I put the label THIS IS EMPTY to show where there's no contents at all being

[tw] Re: [TW5] Need help with TW5-script

2016-03-25 Thread BJ
Hi mark, this is a typical tw5 2'gotcha' <$set name="text2convert" value=<> > the macro only does basic text substitution. You need to use this pattern <$set name="text2convert" value={{$x$}} > and so must put your code inside a macro \define amacro(x) <$set name="name_of_tiddler"

[tw] Re: [TW5] Need help with TW5-script

2016-03-25 Thread 'Mark S.' via TiddlyWiki
Hi Jed, I've tried this in all sorts of iterations. I was hoping that wrapping a macro in a macro could finally force it to acknowledge the actual text in the dereferenced name tiddler. Your variation put this into the "converted" tiddler: *{{TitleIUsedInTheForm}}* So the literal string with

[tw] Re: [TW5] Need help with TW5-script

2016-03-25 Thread Jed Carty
It is probably the <$set name="text2convert" value=<> > line that does it. Why don't you just use one macro instead of creating a macro that just calls a second macro? Make textin: \define textin() {{$(name_of_tiddler)$}} and use that as the value for text2convert instead of textin2 --