Thanks! It was the comma. Always the little things that get you.

I see now that the @variables are being passed from the web extension. Or 
at least some of them.

Thanks!
Mark

On Wednesday, January 17, 2018 at 11:39:57 AM UTC-8, BJ wrote:
>
>
> On Wednesday, January 17, 2018 at 7:17:26 PM UTC, Mark S. wrote:
>>
>> Is there any other magic? I have the javascript macro, but the variables 
>> inside it are "invisible".
>>  
>>
> the macros need to be of type application/javascript and module type 
>  'macro'
>
> There needs to be a comma between parameters when calling the macro 
> (missing from your example)-
> ((*@makelink(@text,@linkURL)*))
>
>> My macro:
>>
>> exports.name ="makelink";
>> exports.run  = function(clip,link) {
>>        var ret = "[["+clip+"|"+link+"]]";
>>        return ret ;
>> }
>>
>>
>> (tagged with $:/tags/tiddlyclip)
>>
>> When I run it via a clip, the result is "undefined", suggesting that it 
>> doesn't see one or more of the values that are passed.
>>
>> Also, I'm looking through the code, but I can't find where linkURL and 
>> other variables are defined. Any hints?
>>
>> Thanks!
>> -- Mark
>>
>> On Wednesday, January 17, 2018 at 11:06:18 AM UTC-8, BJ wrote:
>>>
>>>
>>>
>>> On Wednesday, January 17, 2018 at 3:54:03 PM UTC, Mark S. wrote:
>>>>
>>>> I'm attempting to use macros in tiddlyclip
>>>>
>>>> I have a macro *makelink *tagged globally with $:/tags/Macro.
>>>>
>>>> tiddlyclip macros are javascript only and are tagged with 
>>> $:/tags/tiddlyclip 
>>>
>>>> It's contents are:
>>>>
>>>> \define makelink(clip link) [[$clip$|$link$]]
>>>>
>>>> In the body column of the clip rule I have:
>>>>
>>>> \n\n((*@makelink(@text @linkURL)*))
>>>>
>>>> But when I run it, I get:
>>>>
>>>> source: invalid val @text @linkURL
>>>>
>>>> and then
>>>>
>>>> makelinkmarco not found
>>>>
>>>> The @text and @linkURL variables worked by themselves. And the makelink 
>>>> macro works fine by itself (not called from tiddlyclip). Is there a some 
>>>> sort of registration that has to happen for the macro to work?
>>>>
>>>> Thanks!
>>>> Mark
>>>>
>>>> On Tuesday, January 16, 2018 at 8:22:36 PM UTC-8, Mark S. wrote:
>>>>>
>>>>> Thanks for maintaining this code, BJ!
>>>>>
>>>>> A few comments.
>>>>>
>>>>> There seem to be a LOT of undocumented @variables.
>>>>>
>>>>> The Image and Link modes don't seem to hide/unhide the rule, but maybe 
>>>>> I'm not using it correctly.
>>>>>
>>>>> How do I make a Link inside a rule? The "|" destroys the table 
>>>>> formatting causing the whole rule to not be run.
>>>>>
>>>>> There is a reference to "Sections", but I only see how to identify 
>>>>> categories. How/where are sections used?
>>>>>
>>>>> It would be handy if there was a linkTEXT (or linkText) variable so 
>>>>> that a complete link with name could be captured
>>>>>
>>>>> Thanks!
>>>>> Mark
>>>>>
>>>>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" 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/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/82cb056c-2dc3-496f-aca3-80e4da34350b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to