link to a local file, specifying the app it opens with?

1,600 views
Skip to first unread message

Mad Scientist Jr

unread,
Oct 11, 2010, 11:33:18 AM10/11/10
to TiddlyWiki
Below I included a post about linking to a local file, but is there
any way to specify opening a file within a specific application?

For example if you have a local file:
C:\temp\myfile.htm
double-clicking it opens in the file in Firefox (which is set as my
default browser).

In Windows, you can right-click and make a shortcut "Shortcut to
myfile.htm" and edit the shortcut target to something like:

"C:\Documents and Settings\MadSciJr\Local Settings\Application Data
\Google\Chrome\Application\chrome.exe" "C:\Temp\myfile.htm"

and now the shortcut opens the file in Chrome,

or

C:\WINDOWS\notepad.exe "C:\Temp\myfile.htm"

opens it in Notepad.

Does anyone know of any way to make a link in a tiddler not only to
open a local file, but to specify which program it should open in
similar to above?

Thanks


From: Anthony Muscio <anthony...@gmail.com>
Date: Mon, 21 Jun 2010 15:39:02 +1000
Local: Mon, Jun 21 2010 1:39 am
Subject: Re: [tw] Re: link to local files and folders
Forward | Print | Individual message | Show original | Report this
message | Find messages by this author

There are a few ways to do this.

Here is a quick dump of one
Use http://www.Remotely-Helpful.com/TiddlyWiki/LaunchApplication.html<http://www.remotely-helpful.com/TiddlyWiki/LaunchApplication.html>

in windows usuing cmd /c "filepath/filename.ext" will launch the
associated
application according to the extension. eg .ppt

C:\WINDOWS\system32\cmd.exe is the program

Now use alias plugin
http://www.TiddlyTools.com/#AliasPlugin<http://www.tiddlytools.com/#AliasPlugin>
And define this as

<<alias OpenFile {{"|\<\<LaunchApplicationButton 'Open file' 'Open
using
Launch application' 'C:\\WINDOWS\\system32\\cmd.exe' '/c %0'\>\>|\n"}}
>>

<<alias OpenFile {{"|\<\<LaunchApplicationButton 'Open file %0' 'Open
using
Launch application' 'C:\\WINDOWS\\system32\\cmd.exe' '/c %0'\>\>|\n"}}
>>

<<OpenFile "D:\Data\TestOpen.doc">>
<<OpenFile "D:\Data\TestPPT.pptx">>

Only I am not sure how to open files with spaces in the name.

another way is to create an executable that does this for you (eg;
From a
Batch to exe generator)

TonyM

If you have not found an easy way to do it with TiddlyWiki, you have
missed
something.
www.tiddlywiki.com

On Fri, Jun 18, 2010 at 01:44, skye riquelme
<riquel...@gmail.com>wrote:

- Hide quoted text -
- Show quoted text -
> Hi All

> I would love to see a result here. As I understand it the problem is
> not the local link...its Powerpoint. I have tried various ways to have
> a powerpoint open up inside a TW,,,links, iframes.....seems the
> dificulty is that, how powerpoint is processed depends on the browser
> settings.......so its not much use when offering TWs for study.....as
> I cant control the browser settings of students.

> At this stage I personally dont use powerpoint - I use a TW as the
> presentation system.......works better than powerpoint for my
> application.

> My other solution is for when I want to use a powerpoint from
> others...I just convert it too PDF...and them view it through an
> iframe.....

> And I would love to see other possibility

> Thanks
> Skye

> On 17 Jun, 12:24, spartyhacker <wenhao.stud...@gmail.com> wrote:
> > Hi all:

> > I want to input link like:

> > file:///c:\test.ppt

> > and when I click the link, powerpoint could directly pops up and open
> > the original file.

> > Is there any way to do this?

> > I know people talked about it in previous posts, and the "file:///"
> > type link is what I found. But that actually only "download" the file
> > and open a copy of it, instead of the original one.

> --
> You received this message because you are subscribed to the Google Groups
> "TiddlyWiki" group.
> To post to this group, send email to tiddl...@googlegroups.com.
> To unsubscribe from this group, send email to
> tiddlywiki+...@googlegroups.com<tiddlywiki%2Bunsu...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/tiddlywiki?hl=en.

Tobias Beer

unread,
Oct 11, 2010, 5:56:48 PM10/11/10
to TiddlyWiki
Hi Tony,

For obvious security reasons, this really should not work in any
browser that gives a damn about your computer's health. I really
wonder how come it does.

At first, clicking on any of the links when looking at...

http://www.remotely-helpful.com/TiddlyWiki/LaunchApplication.html

...did one of two things:

in Firefox: absolutely nothing
in Internet Explorer: hello bluescreen

But now that I have rebooted, downloaded that wiki and locally
modified the paths in the macro tiddler to the correct locations on my
xp installation ...it actually does start the processes!

Big ouch! I mean, how terrifying is that?!

This is so inviting to anything malicious that it's rather painful to
see it work. At least, thinking that a dynamically loaded library
could run stuff on my machine with this is not what I would call
comforting ...or can it not?

So, topmost priority for any TiddlyWiki that you run locally and which
makes use of this is to NEVER load any javascript from a remote server
into such a TiddlyWiki or to have plugins installed that contact
remote servers to load stuff on demand.

Other than that, if you're 100% certain about what you're
doing ...this is really cool stuff allowing you to mix and match
TiddlyWiki information management with your local files and
applications corresponding to your tiddlers content, esp. in
combination with FileDropPlugin [1].

As for your question, I simply created a windows link that runs a
program with certain parameters and, of course, shudder, it executed.

When it comes to white spaces or other special characters in a path/
filename ...well, don't use them.

Would you mind sharing what specifically you use this for?


Cheers, Tobias.

[1] http://tiddlytools.com/#FileDropPlugin

TonG

unread,
Oct 12, 2010, 4:37:15 AM10/12/10
to TiddlyWiki
Hi All,

For what it‘s worth: I tried to use LaunchApllicationPlugin in the
past, but got very irreproducible results [1].

Cheers,

Ton

[1] http://groups.google.com/group/tiddlywiki/browse_thread/thread/7d5db35c69b40bd4/c6bf5e8ff9372835?lnk=gst&q=TonG#c6bf5e8ff9372835

Mad Scientist Jr

unread,
Oct 12, 2010, 5:10:34 PM10/12/10
to TiddlyWiki
Thanks for your replies.

>Would you mind sharing what specifically you use this for?

Sure, there are a few things including

1. embed an Excel spreadsheet (and the actual Excel application) in a
tiddler, not just to have a realtime editable table but also
a) use Excel interface & functions (my preferred interface for
tabular data, colleagues already know Excel)
b) access to custom VBA code, formulas, macros & forms (which I have
a lot of) without having to recreate them
c) access all of Excel's other native functionality (existing
charts, reports, etc.)
d) spreadsheet can be treated just like any other tiddler (taggable,
can save in StorySaver plugin, etc.)
e) spreadsheet would be searchable as a tiddler: I think TW has a
plugin to search various file types including Excel. However it
returns a list of matching files. I would prefer it to return a list
of tiddlers, where each tiddler has the associated spreadsheet
embedded in it.
f) it will be convenient for spreadsheet to show up in the same
window as inline editable content along with the other tiddlers

2. ditto for Access.
a) be able to create a tiddler as a "view" - ie link a tiddler to a
certain SQL query, or a certain form in Access, etc, and attach tags
to it.
b) use TiddlyWiki as the front end for Access DB
c) people interacting with Access through some other interface can
update TiddlyWiki from their app
d) TiddlyWiki becomes another data source for some external app
(people can query tiddlers or other data in TiddlyWiki from their app)
e) ability to reuse already written VBA code for TiddlyWiki, instead
of having to rewrite in JavaScript

3. embed WAV, flash, etc. files in TiddlyWiki. However I think the
PlayerPlugin should work fine for this, though I have some questions I
can put in a separate post.

4. Specify some custom editor for a specific tiddler's content. I
found the Externalize plug-in which would be a solution for simple
text, but can't get it 100% working, and I'm not sure how to get it to
do everything I want (I will post separately about that).

For security purposes I think you should be able to specify that the
browser should ONLY run or embed "myprogram.exe" for
"mytiddlywiki.html" on the user's local machine?

Hope this helps... Thanks again.

PS this is not Tony, I only quoted Tony's post in my own because it
was an earlier discussion related to my question : ) 0

Tobias Beer

unread,
Oct 12, 2010, 7:21:59 PM10/12/10
to TiddlyWiki
A) Which parts of what you wrote exist and which are in the "I would
love that" category?

B) Are you sure you're setting the right scope for TiddlyWiki? You
seem to be setting very high (/way too high?!) expectations as to what
you want to do with TiddlyWiki.

C) When you say 'embedding', you would not mean in binary form, would
you? I guess what you mean is some form of "application frame"
loading, for example, a Spreadsheet (stored on your filesystem) into
the display area above or below a tiddler, right?

D) I have never heard of anything like that. Do you have that working?
Is there a browser plugin required that allows you to run Excel or
Word or Access in ...IE, FF, where?

E) There are adaptors that allow TiddlyWiki to search in Excel
spreadsheets, really?

Cheers, Tobias.

Mad Scientist Jr

unread,
Oct 13, 2010, 7:28:13 PM10/13/10
to TiddlyWiki
Thanks for your reply. Let's see...

>A) Which parts of what you wrote exist and which are in the "I would love that" category?

Everything exists in VBA. Lots of stuff.

>B) Are you sure you're setting the right scope for TiddlyWiki?
>You seem to be setting very high (/way too high?!) expectations
>as to what you want to do with TiddlyWiki.

Maybe. It's a Web page and a front end. Increasingly I am seeing more
and more things done in Web pages (and software/tech in general) that
people just assumed couldn't be done. So my approach this time around
is no to worry about if it *can* be done, but to focus on what would I
*like* the app to do, and then worry about how to make that happen.
It's kind of dumb and counter-intuitive but how else do people come up
with these new capabilities? :-)

>C) When you say 'embedding', you would not mean in binary form, would
>you? I guess what you mean is some form of "application frame"
>loading, for example, a Spreadsheet (stored on your filesystem) into
>the display area above or below a tiddler, right?

By embedding I mean inside a tiddler. Example tiddly ml for the body
might be:

<BODY>
!Expenses
Some text<br>
<<MyExcelPlugin width="100%" height="600px" file="c:\mypath
\myfile.xls">>
!Abstract
more text
</BODY>

and Excel, with the document open, shows up inbetween "Some text" and
"Abstract" at the size specified.

I am not sure what you mean by binary form or application frame -
whatever works! :-)

>D) I have never heard of anything like that. Do you have that working?
>Is there a browser plugin required that allows you to run Excel or
>Word or Access in ...IE, FF, where?

You could embed Active-X controls in IE pages, not sure how it would
be done in Firefox (or even if).

>E) There are adaptors that allow TiddlyWiki to search in Excel
>spreadsheets, really?

I could swear I saw some kind of "search local files" plugin that
included support for Word (DOC, RTF), Excel, and some other file
types. I was tearing through sites trying to find some info so I don't
know where I may have seen this and won't have time to backtrack.

In any case, Javascript in TiddlyWiki can read & write files on the
local system right? So it would just be a case of writing code to do
binary read or write to a file, and support the file type (Excel, Word
or whatever).

But to embed an Excel file I think I am looking more to somehow embed
the existing application at the specified point in the tiddler in the
browser.

Keep in mind I've hacked around with TiddlyWiki but am in no way an
expert on this or modern Web programming. I have seen a lot of stuff
done however that would make me think it should be possible.

Thanks again!

Mad Scientist Jr

unread,
Oct 13, 2010, 7:28:37 PM10/13/10
to TiddlyWiki
Thanks for your reply. Let's see...

>A) Which parts of what you wrote exist and which are in the "I would love that" category?

Everything exists in VBA. Lots of stuff.

>B) Are you sure you're setting the right scope for TiddlyWiki?
>You seem to be setting very high (/way too high?!) expectations
>as to what you want to do with TiddlyWiki.

Maybe. It's a Web page and a front end. Increasingly I am seeing more
and more things done in Web pages (and software/tech in general) that
people just assumed couldn't be done. So my approach this time around
is no to worry about if it *can* be done, but to focus on what would I
*like* the app to do, and then worry about how to make that happen.
It's kind of dumb and counter-intuitive but how else do people come up
with these new capabilities? :-)

>C) When you say 'embedding', you would not mean in binary form, would
>you? I guess what you mean is some form of "application frame"
>loading, for example, a Spreadsheet (stored on your filesystem) into
>the display area above or below a tiddler, right?

By embedding I mean inside a tiddler. Example tiddly ml for the body
might be:

<BODY>
!Expenses
Some text<br>
<<MyExcelPlugin width="100%" height="600px" file="c:\mypath
\myfile.xls">>
!Abstract
more text
</BODY>

and Excel, with the document open, shows up inbetween "Some text" and
"Abstract" at the size specified.

I am not sure what you mean by binary form or application frame -
whatever works! :-)

>D) I have never heard of anything like that. Do you have that working?
>Is there a browser plugin required that allows you to run Excel or
>Word or Access in ...IE, FF, where?

You could embed Active-X controls in IE pages, not sure how it would
be done in Firefox (or even if).

>E) There are adaptors that allow TiddlyWiki to search in Excel
>spreadsheets, really?

I could swear I saw some kind of "search local files" plugin that
included support for Word (DOC, RTF), Excel, and some other file
types. I was tearing through sites trying to find some info so I don't
know where I may have seen this and won't have time to backtrack.

In any case, Javascript in TiddlyWiki can read & write files on the
local system right? So it would just be a case of writing code to do
binary read or write to a file, and support the file type (Excel, Word
or whatever).

But to embed an Excel file I think I am looking more to somehow embed
the existing application at the specified point in the tiddler in the
browser.

Keep in mind I've hacked around with TiddlyWiki but am in no way an
expert on this or modern Web programming. I have seen a lot of stuff
done however that would make me think it should be possible.

Thanks again!



Reply all
Reply to author
Forward
0 new messages