Action equivalent of click on link and other enhancements

93 views
Skip to first unread message

TonyM

unread,
May 24, 2019, 10:36:18 PM5/24/19
to TiddlyWiki
Folks,

I am using TiddlyDesktop to launch apps from a button

Part if this code is
<$list filter="[has[desktop-link]]">
   <$list filter="[is[current]get[desktop-link]] ] -[has[draft.of]]" variable="link">
      <a title={{!!tooltip}} href=<
<link>> ><$transclude tiddler=<<currentTiddler>>/></a>
   </$list>
</$list>
in the above an svg file has a desktop-link field with the file://path/executable.exe, it displays the image and you click it to open the app.

Clicking on the button or a link the application opens on my desktop. Great so far.

I would like to find an Action equivalent of a click on a link, so I can create a Button to open multiple apps in one click.
This should also hold true for a list of urls

Any suggestions would be appreciated.

Running batch/command or other scripts
I know bob permits this however I am trying to simplify if for single file wikis on TiddlyDesktop
This does not work when the file is a batch file, thus the next item
I could launch an executable that runs the batch file but I can't pass any parameters to the links, so the only option I see is to write batch files and convert them to exe's which is time consuming and needs to be done every time.

Passing parameter with a file: link
html allows for passing information on the urls but is there a way to pass parameters on the file: link?

Thanks if you have anything to suggest
Tony

TonyM

unread,
May 25, 2019, 1:56:42 AM5/25/19
to TiddlyWiki
A Related post by me is about protocol handlers because If I can also batch process multiple links to a custom protocol handler even more is possible.

Regards
Tony

PMario

unread,
May 25, 2019, 2:29:35 AM5/25/19
to TiddlyWiki
Hi Tony,

You could probably use the linkcatcher widget. It allows you to define actions, that are executed if a link is clicked. https://tiddlywiki.com/#LinkCatcherWidget

-m

TonyM

unread,
May 25, 2019, 2:38:44 AM5/25/19
to TiddlyWiki
Mario,

Possible, yes thanks. I have only seen it used in TOC macros and we have no examples on tiddlywiki.com but I will have a go.

Regards
Tony

TonyM

unread,
May 25, 2019, 2:51:57 AM5/25/19
to TiddlyWiki
Mario,

I have link catcher storing the item I clicked on, and I can add multiple actions to it, but I am still missing the action that will open an external link.

All the navigation widgets seem to refer only to tiddlers. Not external links.

Regards
Tony

PMario

unread,
May 25, 2019, 4:52:57 AM5/25/19
to TiddlyWiki
Hi,

may be you can use the <$action-navigate $to="file://path/executable.exe"/>. Didn't test it.

-m

TonyM

unread,
May 25, 2019, 5:24:36 AM5/25/19
to TiddlyWiki
Unfortunately not!

It opens a new tiddler called "file://path/executable.exe".


<$link to="file:///C:\Windows\notepad.exe">Go</$link>
also opens a tiddler

<$button>
<$action-sendmessage $message="tm-open-external-window" $param="file:///C:\Windows\notepad.exe" windowName="_tiddlywiki" windowFeatures="height=500, width=900"/>
Open ~TiddlyWiki - Action
</$button>
wants to save notepad.exe

Thanks, I will keep looking

Regards
Tony

BJ

unread,
May 25, 2019, 6:15:03 AM5/25/19
to TiddlyWiki
Hi Tony,
there is a click widget on http://bjtools.tiddlyspot.com/
you put it inside links, and it clicks them all when the tiddler given as a parameter to the widget is modified.

cheers
BJ

TonyM

unread,
May 25, 2019, 9:06:02 AM5/25/19
to TiddlyWiki
Bj

Thank for helping. Are you referring to clickaction? I am not sure how to use it but will review again tomorrow.

I am trying to batch click on href links within tiddlydesktop because the links can run executables.

An example maybe to run node open a browser and email client, and execute a script. Is this what you thought clickaction can do ?

thanks
Tony

BJ

unread,
May 25, 2019, 10:23:49 AM5/25/19
to tiddl...@googlegroups.com
the click widget emulates mouse clicks - you can have any number:

<$button set=<<qualify "$:/state">> setTo="open">click links</$button>

<a href="""file:///meditation.html""">meditate<$click state=<<qualify "$:/state">> text="open"/> </a>

<a href="""file:///reader.html""">read<$click state=<<qualify "$:/state">> text="open"/> </a>

I have only used this internal links so I don't know if it will work or not.

TonyM

unread,
May 25, 2019, 9:58:19 PM5/25/19
to TiddlyWiki
Bj,

Thanks for the additional info. I have tried the following at http://bjtools.tiddlyspot.com/

<$button set=<<qualify "$:/state">> setTo="open">click links</$button>

<a href="""https://tiddlywiki.com""" target="_blank">meditate<$click state=<<qualify "$:/state">> text="open"/> </a>
<a href="""https://google.com"""  target="_blank" >read<$click state=<<qualify "$:/state">> text="open"/> </a>


I added target="_blank" to force open in new window, so I do not leave the wiki.

Bother links work apart, but I cant seem to get them to both open

It seems like a really cool trick.

Regards
Tony

PMario

unread,
May 26, 2019, 8:38:12 AM5/26/19
to TiddlyWiki
On Saturday, May 25, 2019 at 11:24:36 AM UTC+2, TonyM wrote:
Unfortunately not!

It opens a new tiddler called "file://path/executable.exe".

Did you test it with "forward slashes?" like: "file:///C:/Windows/notepad.exe"??

-m
Reply all
Reply to author
Forward
0 new messages