Step by step instructions on how to open external files in TiddlyWiki

1,075 views
Skip to first unread message

Dan Hansen

unread,
Jun 4, 2017, 2:38:17 AM6/4/17
to TiddlyWiki
HI All,

I'm new to TiddlyWiki and I'm not quite sure its the tool for me.

Everything seems good but I cant seem to be able to open external applications from within a tiddler.

The main two applications I need to open are Notepad text files and Outlook *.msg files.

The files are in the same folder as my TiddlyWiki file.

Is there an easy link

eg.

[ext[UpdateTemplate|templates.txt]]

[ext[SendCourtesy|CourtesyTemplate.msg]]

If there is a way to do it can someone give me easy to follow step-by-step instructions on how this can be done?

Mat

unread,
Jun 4, 2017, 5:24:02 AM6/4/17
to TiddlyWiki
Hi Dan

welcome to TW! Can I ask how you found out about TW?

As for your question; due to browser restrictions (for safety reasons) it is typically not possible to execute external applications. I'm not sure if there are exceptions but it would then for sure depend on which browser you're using. So please reply with browser + OS, even if I doubt there will be a positive answer. Also, tell if your TW stored as a local file on your computer. (BTW, I am not qualified to give you a final/definitive answer.)

<:-)

Dan Hansen

unread,
Jun 4, 2017, 6:52:56 AM6/4/17
to tiddl...@googlegroups.com
Hi Matt,

I found TW through a Google search. I was looking for something simple in order to keep and share information.

I'm still not sure it is what I need. 

I know simple javascript can achieve what I'm trying to do. Eg.

<html>
   
<head>
       
<script type="text/javascript">
       
function runNotepad(fname)
       
{
            
if (fname.substring(0,1) === '.')
           
{
               fname
=  location.pathname.substring(1, location.pathname.lastIndexOf('/')) + fname.substring(1,fname.length);    
           
}    
            
var shell = new ActiveXObject("WScript.Shell");                
           
var appWinMerge = "\"C:\\WINDOWS\\system32\\notepad.exe\"";
            shell
.Run(appWinMerge + " " + fname);
       
}
        </script>
   
</head>


   
<body>
       
<a href="javascript:runNotepad('./templates.txt')">Open templates.txt</a><br />
   
</body>
</html>


I have read several sites where they say it can be done but I just can't seem to follow how to implement their instructions.

Eg.



I just can't get any of these to work.

Cheers

Dan

Dan Hansen

unread,
Jun 4, 2017, 7:02:29 AM6/4/17
to TiddlyWiki

@TiddlyTweeter

unread,
Jun 4, 2017, 8:07:56 AM6/4/17
to TiddlyWiki
Dan

I wrote the message below before I saw your latest reply, which indicates you know what you are doing. But I'm still not clear what your aim is beyond normal external "download" file opening?

I'm sure we can lick this.

Best wishes
Josiah

-------------
Ciao Dan

This is not per se a TiddlyWiki issue. Opening external files depends on the operating system as well as the browser. And, as Mat mentions, its less easy than it once was. BUT, for desktop browsers, at least, or at least Firefox, you should be able to do it. What actually is happening is that the browser, if it does not recognise a file type it can deal with natively, passes the file to the operating system via "download" / "save". Then, depending on how you have the OS setup, and also how individual apps work, the file can  directly open in the app.

The mechanism for Firefox is described here...

http://kb.mozillazine.org/File_types_and_download_actions

... it shows how to add new types as well as to make the process of "download-file-opening" automatic.

Note, the file opened will usually NOT be the original file, but a copy.

A way to establish whether Firefox on a Windows desktop will open file types is to enter ...

    file:///C:/

... into the address bar, navigate to a file you want to test, click on it and see what happens.

Just to be sure, I tested a TW Tiddler with a link to local files, exactly like you, with filetypes not supported by the browser.  It worked fine for me.

A similar mechanism used to work in Chrome too.

If you can't get it working ask again with a bit more detail of what happens, your OS & browser.

Best wishes
Josiah

TonyM

unread,
Jul 17, 2017, 5:10:55 AM7/17/17
to TiddlyWiki
Dan,

If you have not seen it yet, check out the discussion I started and some results;

[TW5] Windows Desktop Interactive TiddlyWiki 5
https://groups.google.com/forum/?hl=en#!topic/tiddlywiki/By4xN8y9I3s

Also, the firefox plugin It's All Text! is great for editing tiddler text in another app.

Regards
TonyM
Reply all
Reply to author
Forward
0 new messages