So does

\define sfTo() ..\..\pages\tw\tw_$(twName)$\


<$set name=twName value={{$:/PerryMason}}> 
<$button>
  Make a ''<<twName>>'' single file
  <$action-websocketmessage $type='buildHTMLWiki' outputFolder=<<sfTo>> 
outputName="index.html" />
</$button>
</$set>

Not work?

-- Mark

On Sunday, June 3, 2018 at 12:50:49 PM UTC-7, @TiddlyTweeter wrote:
>
> It is in a single tiddler with several other buttons that just vary 
> slightly. Its a Tiddler from which I "Automate" the wiki using Bob commands.
>
> On Sunday, 3 June 2018 20:35:05 UTC+2, Mark S. wrote:
>>
>> Where does this button appear? In a template, or a single launch tiddler?
>>
>> More importantly, why not wrap a <$set name=twName 
>> value={{$:/PerryMason}}> </$set> around the button (deleting macro twName 
>> of course) ?
>>
>> Good luck!
>> -- Mark
>>
>> On Sunday, June 3, 2018 at 11:01:47 AM UTC-7, @TiddlyTweeter wrote:
>>>
>>> Yeah its to do with Bob automation. 
>>>
>>> It works perfectly if I give it a defined literal string like this ...
>>>
>>> \define twName() Paul Drake
>>> \define sfTo() ..\..\pages\tw\tw_$(twName)$\
>>>
>>> And then click command to make a wiki ...
>>>
>>> <$button>
>>>   Make a ''<<twName>>'' single file
>>>   <$action-websocketmessage $type='buildHTMLWiki' outputFolder=<<sfTo>> 
>>> outputName="index.html" />
>>> </$button>
>>>
>>> Console report ... works fine ...
>>>
>>> Build Wiki
>>> Built Wiki:  C:\bag\PortableApps\twMU\pages\tw\tw_Paul Drake\index.html
>>>
>>> My idea was NOT to have to hard code the name of every output wiki, but 
>>> rather use the text field of "$:/WikiName" since that is built in. When Bob 
>>> creates a wiki that Tiddler is created. 
>>>
>>> I never envisaged that getting the plain text into a global variable 
>>> could be so complex! I thought the issue was just me :-). Apparently its a 
>>> bit more complicated.
>>>
>>> J.
>>>
>>> On Sunday, 3 June 2018 19:39:21 UTC+2, Mark S. wrote:
>>>>
>>>> I imagine this relates to invoking commands from Bob, which I haven't 
>>>> studied. Where is this "path: 'c:\\....'" structure located? Is it in a 
>>>> regular tiddler? 
>>>>
>>>> If it really needs to be hard-coded text, then I think you would need a 
>>>> button that would trigger actions that would create the actual text. It 
>>>> would be something you need to do whenever updating your configuration, I 
>>>> suppose.
>>>>
>>>> -- Mark
>>>>
>>>> On Sunday, June 3, 2018 at 10:28:25 AM UTC-7, @TiddlyTweeter wrote:
>>>>>
>>>>> Mark S. wrote:
>>>>>>
>>>>>> I think you need to explain more about your use case.
>>>>>>
>>>>>
>>>>> You are right. The difficulty *IS* explaining it.
>>>>>
>>>>> Transclusion is so sophisticated in TW many don't realise that when 
>>>>> you create macro/variables you are transferring the "transclusion code" 
>>>>> into it, not the value, most of the time.
>>>>>  
>>>>>
>>>>>>  You could just create a global macro:
>>>>>>
>>>>>> \define perry() {{HelloThere!!text}}
>>>>>>
>>>>>
>>>>> Works perfectly in most transclusion contexts. But you can see the 
>>>>> issue with that is if you use the macro in a context like a command 
>>>>> processor that only accepts literal text... the macro/variable isn't 
>>>>> holding the value, but the transclusion code to display it.
>>>>>
>>>>> path: 'C:\\bag\\PortableApps\\twMU\\pages\\tw\\tw_
>>>>> {{$:\\HelloThere!!text}}\\index.html'
>>>>>  
>>>>> I will try layout a more detailed example and be as clear as I can. 
>>>>> But I think this starts to illustrates the issue I hope.
>>>>>
>>>>> Thanks
>>>>> Josiah
>>>>>
>>>>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
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/a7054698-2925-46c8-b328-04b25f3ca511%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to