Desktop Automation tip Windows

224 views
Skip to first unread message

TonyM

unread,
Jan 14, 2020, 7:42:21 PM1/14/20
to TiddlyWiki
Folks,

I thought I would share this working solution I have.
  • A Wiki running in TiddlyDesktop
  • Has the below tiddler called networkcheck
<a title={{!!tooltip}} href="file:///C:\Data\batches\runnetworkcheck.cmd" > Go</a>

<$button set="Networkcheck!!last-refresh" setTo=<
<now "0hh:0mm">> >
Refresh {{Networkcheck!!last-refresh}}
</$button>

<object width="100%" height="930" data="file:///C:\Data\batches\networkcheck.txt"></object>

  • Clicking on "Go" runs the command runnetworkcheck.cmd in a Command Prompt window, that closes when finished
  • Clicking on "Refresh" reloads the output from runnetworkcheck.cmd which was directed into networkcheck.txt
  • I can review the output of networkcheck.txt in the tiddler.
In runnetworkcheck.cmd I run a set of batch commands, windows command line tools and pings to test each step of my network access to the world and every important device.

Regards
Tony

Mohammad

unread,
Jan 14, 2020, 10:29:47 PM1/14/20
to TiddlyWiki


On Wednesday, January 15, 2020 at 4:12:21 AM UTC+3:30, TonyM wrote:
Folks,

I thought I would share this working solution I have.
  • A Wiki running in TiddlyDesktop

Is there any reason to use TiddlyDesktop here? 

TonyM

unread,
Jan 15, 2020, 12:03:52 AM1/15/20
to TiddlyWiki
Mohammad,
 
Is there any reason to use TiddlyDesktop here? 

Yes, it has the rights to the local desktop to address files, start programs and access files.

A tiddlywiki.hta file on windows may also have the rights.

Regards
Tony

TiddlyTweeter

unread,
Jan 15, 2020, 12:36:36 PM1/15/20
to TiddlyWiki
TonyM

Nice to see such tips ... It might be worth collecting them together? I seen you post a few :-)

I assume this will also work for Mac & Unix shell files too for TiddlyDesktop?

BTW you can get a similar mechanism working with single-file wikis in Firefox when you have installed the Timimi saver for FF since it also can access the OS (via its scripting tool).

Best wishes
TT

TonyM

unread,
Jan 15, 2020, 5:51:19 PM1/15/20
to TiddlyWiki
TT,

I hope to encourage anyone to post a tip when they have one, it adds value to the forums and allows alternative approaches to be discussed. We all learn so many things and have "our own way" to do things and it is this establish methods we need to share. I learned early in my career we all discover useful tips and workflows and sharing these have great results. 

I hope someone can test Mac & Unix shell files too for TiddlyDesktop and share back!

True we should then try to document Tips we use and improve documentation, possibly even extend the standard distribution according to the value realised.

I agree it is possible to leverage Timimi to do this, and important to note this here, however it does require a different design. 

This tip/method simply allows intuitive links and html to local resources to work out of the box. Making a local desktop tiddlywiki is quite bespoke to what is installed, so in someways we do not need to try and universalise it, if you can install TiddlyDesktop you can build your desktop interactions, your desktop is always different to mine.

Not withstanding the above, given my experience in corporate desktop standards, I see it would be possible to design a solution to be deployed to Standard Desktop Environments to support and empower users.

Regards
Tony

TiddlyTweeter

unread,
Jan 16, 2020, 4:11:46 AM1/16/20
to TiddlyWiki
TonyM wrote:
I agree it is possible to leverage Timimi to do this, and important to note this here, however it does require a different design. 

Right. But only slightly different. Same with Bob. 

I think it might be interesting to look at common methodology.

FYI, Timimi requires that "scripts" be in its "...\Timimi\Scripts\" sub-dir. Same with Bob's "scripts", they go in a specified sub-dir.
(One good thing with Bob & Timimi, of course, is that their script methods take parameters).

Personally I'd rather not write different scripts for Timimi, Bob & TiddlyDesktop. A way round this is to have a script (Bob, Timimi) or link (TD) that is simply a pointer to repository of one's own batch/shell files. That seems quite like what you are doing?

So, yes, customisation is highly variable. But the o/s logic I think has a consistent pattern that can be illustrated.

BTW, part of the thoughts behind Polly were to facilitate all this in an integrated cross-platform way. 
With Polly started you could provide the services you illustrated for any wiki. And with Bob, Timimi & TD you could also launch Polly from the wiki itself.

Thoughts!

TT

TonyM

unread,
Jan 16, 2020, 5:56:39 AM1/16/20
to TiddlyWiki
TT,

It is important to discuss this, because in time TiddlyWiki can provide a compelling application with full desktop interaction, on multiple OS's in addition to website, Apps and server functionality.

By posting this tip however I wanted to bring to the attention of Windows users that by using a local app like TiddlyDesktop you can almost use native windows commands and links to get the desktop interaction. When you build a "dedicated" wiki for a specific desktop, even specific computer, you don't need to be able to handle cross platform and browser etc... so for any primary windows users this seems to me simple and compelling. I have not tested it but I expect the same would be for the case for other platforms as "It can be installed on Windows, Mac OS X or Linux. It is compatible with TiddlyWiki version 5 and the older TiddlyWikiClassic." And that one each platform I imagine the same can be done there with native links executions etc...


Right. But only slightly different. Same with Bob. 

We should provide examples that reduce this gap, but With bob an Timimi there needs to be message sent on the way to getting a result.
 

I think it might be interesting to look at common methodology.

Totally agree, and in the discussions thread from which Polly became a thing, I was suggesting an identical process to save tiddlywiki on any platform, you and was it Mark - took this a lot further in a slightly different direction to me.


FYI, Timimi requires that "scripts" be in its "...\Timimi\Scripts\" sub-dir. Same with Bob's "scripts", they go in a specified sub-dir.
(One good thing with Bob & Timimi, of course, is that their script methods take parameters).

Yes, it would be nice to document this with both tools documented together, and considering each OS below it.
 

Personally I'd rather not write different scripts for Timimi, Bob & TiddlyDesktop. A way round this is to have a script (Bob, Timimi) or link (TD) that is simply a pointer to repository of one's own batch/shell files. That seems quite like what you are doing?

I agee, but in the case of tiddlydesktop I did not write any scripts/batchfiles etc...I just referenced them, ie executables, batchfiles, folders or file names. Including using
<object width="100%" height="930" data="file:///C:\Data\batches\networkcheck.txt"></object>
To make local files, or the result of a native OS script visible.

 
So, yes, customisation is highly variable. But the o/s logic I think has a consistent pattern that can be illustrated.

Yes, I agree, it is just less needed with straight TiddlyDesktop to local OS interactions
 

BTW, part of the thoughts behind Polly were to facilitate all this in an integrated cross-platform way. 
With Polly started you could provide the services you illustrated for any wiki. And with Bob, Timimi & TD you could also launch Polly from the wiki itself.

This is a noble objective, but one I find hard to speculate too far given I am a windows Expert, not linux or MAC. I offer my support on windows but need others to extend it across OS's.
 

Thoughts!

Thanks for asking. 

Tony

Chuck R.

unread,
Jan 16, 2020, 12:53:26 PM1/16/20
to TiddlyWiki

I thought Mohammed was collecting macros and tips like this.

TiddlyTweeter

unread,
Jan 16, 2020, 1:04:37 PM1/16/20
to TiddlyWiki
He collects TW tips.

We talking about O/S tips to support TW.

Maybe he will collect them too, but they are not directly TW scripts per se.

TT

okido

unread,
Jan 16, 2020, 3:10:28 PM1/16/20
to TiddlyWiki
Hi All,

If you use the node.js API in TiddlyDesktop OS differences are solved by node.js.
The only thing I ran into is spaces in filenames when you execute a shell command on windows. 
I use nw.js in a plain form with TiddlyWiki Classic, this gives you all interaction you want with the OS and filesystem.

Have a nice day, Okido
Reply all
Reply to author
Forward
0 new messages