nisus.com
https://www.nisus.com/forum/

Opening none Nisus files from Nisus (a query)
https://www.nisus.com/forum/viewtopic.php?f=17&t=2635
Page 1 of 1

Author:  js [ 2007-11-03 02:49:05 ]
Post subject:  Opening none Nisus files from Nisus (a query)

It is easy to use the Nisus macro language to open other Nisus files. I use a macro that closes the front file and pastes "Open" plus its pathway into the file that becomes visible if the topmost one is closed by the macro Then you can select it and use "Run selection as Macro". It's an effective method to make references among Nisus files.
Now I wonder whether it is possible to open a none Nisus file with the Nisus macro language. Is it possible to send an instruction as an Apple event that opens a none Nisus file?
Thanks for any suggestions.

Author:  martin [ 2007-11-05 15:16:09 ]
Post subject: 

I'm sorry but I don't understand what you mean by "open a none Nisus file". Do you mean open a new document?

Author:  gemboy27 [ 2007-11-05 16:27:50 ]
Post subject:  non

could JS mean 'non-nisus' file

Author:  martin [ 2007-11-05 16:54:16 ]
Post subject: 

Thanks, that makes sense gemboy, especially in the context of the rest of his comment.

All macro commands that manipulate/open Nisus files can be used on non-Nisus files as well. For example, if you have a plain text file on your desktop you could open it like so:

Code:
Open '~/Desktop/file.txt'

Author:  js [ 2007-11-06 12:25:36 ]
Post subject: 

Martin answered:
Quote:
All macro commands that manipulate/open Nisus files can be used on non-Nisus files as well. For example, if you have a plain text file on your desktop you could open it like so:

Open '~/Desktop/file.txt'


My question was meant somewhat differently: Let's say I work in a project with different applications and their documents involved, the main document being a Nisus document. Can a Nisus macro give instructions to open those non-Nisus files of the project in their own applications? If the Nisus macro language cannot do that by itself, can it maybe give such instructions by calling Apple events or by help of Perl?

Author:  martin [ 2007-11-06 15:12:40 ]
Post subject: 

If you simply want to open a file in the default application associated with the file, you can use the Open URL command as follows:
Code:
Open URL ‘file:///Users/shortname/Desktop/whatever.ext’


If you need to launch/use a specific application then I think you'll have to dip into AppleScript.

Author:  gemboy27 [ 2007-11-06 16:12:55 ]
Post subject: 

Open URL ‘file://localhost/Applications/MarsEdit.app’

I want to open marsEdit by clicking on a link, that I embed in a template

I've figured out a short cut via iKey, but really miss that one click

I understand that OSX.5 is different...but...

do you have any suggest for a work around

Author:  martin [ 2007-11-06 16:18:54 ]
Post subject: 

You're talking about the hyperlink feature you mentioned in this thread, correct? Hmm, you might try creating an alias to the MarsEdit application, and then inserting a hyperlink to that alias in your NWP document.

Author:  gemboy27 [ 2007-11-06 18:35:28 ]
Post subject:  :(

you are absolutely right
and I am still depressed
about it

Author:  js [ 2007-11-07 00:33:11 ]
Post subject: 

martin wrote:
If you simply want to open a file in the default application associated with the file, you can use the Open URL command as follows:
Code:
Open URL ‘file:///Users/shortname/Desktop/whatever.ext’


If you need to launch/use a specific application then I think you'll have to dip into AppleScript.


Thanks, Martin. This allows me to make a hyperlink from my Nisus file to a non Nisus file, f.e. to open a MindManager chart that belongs to a project, directly from the Nisus project file. Great.

There remains a little problem though: If the file name is more than one word, the Nisus macro is unhappy. I tried to drag the icon of such a onto a Terminal window, wich sets the \ signs before spaces. But this still does not work. Can spaces (or other incompatible characters) in file names be dealt with in another way?

Author:  martin [ 2007-11-07 14:49:38 ]
Post subject: 

js wrote:
There remains a little problem though: If the file name is more than one word, the Nisus macro is unhappy. I tried to drag the icon of such a onto a Terminal window, wich sets the \ signs before spaces. But this still does not work. Can spaces (or other incompatible characters) in file names be dealt with in another way?

This looks like a bug. I'll see if we can get this fixed for the forthcoming NWP 1.0.2 release. In the meantime you can use "%20" instead of a space to work around the problem, eg:
Code:
Open URL 'file:///Users/shortname/Desktop/two%20words.ext'

One note: in this case, once we've fixed the bug this workaround will fail.

Page 1 of 1 All times are UTC - 8 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/