I have seen and tried that .. its not about that .. its just that i want to learn about how i can retrieve information from a tiddler and use it in a macro ...
On Saturday, May 12, 2018 at 5:14:50 PM UTC+5:30, PMario wrote: > > Hi, > Did you try: http://evanbalster.com/tiddlywiki/formulas.html ? > > On Saturday, May 12, 2018 at 1:00:44 PM UTC+2, Bala Chandra wrote: >> >> Say i store values in two tiddlers and i want to add those values through >> a javascript macro in tiddlywiki. So i tried the following, but it keeps >> showing that this.getTiddler is not a function. I would like to understand >> how to do it. >> >> exports.name = "add"; >> >> exports.params = [{ >> name: "var1" >> }, { >> name: "var2" >> }]; >> >> exports.run = function(var1, var2) { >> >> var >> t1=$tw.utils.parseFields($tw.wiki.getTiddler(var1).fields.text); // <--- >> see $tw.wiki instead of this. .. >> var >> t2=$tw.utils.parseFields($tw.wiki.getTiddler(var2).fields.text); // may >> do the trick >> > > > BUT .. I didn't test the code. > > -m > -- You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/tiddlywikidev. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywikidev/d9f868e8-a492-4a86-9028-bf0d7b736874%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
