I kind if see where you are going, and happy to explore this with you but still have insufficient info available to help as @CodaCoder also suggests.
- I have being working on something not dissimilar “External links that support a target”
- How are you handling anchors in TiddlyWiki ?
- (or in external links) because this is in itself not strait forward.
- For example, we can now write custom widgets and use genesis widget to redefine existing widget like $link
I have just revisited the Top of this thread, and with a different set of eyes can now see at least two other approaches to this made available in recent versions. Some of which may arguably change your algorithm.
- Since you do not care about individual parameter names just the order in which they are given (with a twist when there are three) we can now use the $parameters widget to extract parameter titles and values.
<<mymacro value1 value2 value3>>
- I am calling the above values, but they are treated as parameter names
- Inside the procedure, and $parmeters widget the $params can give you a list of all parameters and their values, they become values of the parameters 0, 1 and 2.
- However we can then treat this list of parameter names as values.
- In this case rather than using
|
you can seperate each value with a space.
Just as a quick example try this on tiddlywiki.com
\procedure test()
<$parameters $params=params>
<<params>>
</$parameters>
\end
<<test value1 value2 "value 3">>
Returns {"0":"value1","1":"value2","2":"value 3"}
- Then there are a number of ways to make use of the incoming parameter names as values.
- Use the params variable in a set multiple variables widget and more
I will only go into this further if you are interested in exploring this and other approaches.