Reply to topic  [ 11 posts ] 
Opening none Nisus files from Nisus (a query) 
Author Message

Joined: 2007-04-12 14:59:36
Posts: 229
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.


2007-11-03 02:49:05
Profile
Official Nisus Person
User avatar

Joined: 2002-07-11 17:14:10
Posts: 4251
Location: San Diego, CA
Post 
I'm sorry but I don't understand what you mean by "open a none Nisus file". Do you mean open a new document?


2007-11-05 15:16:09
Profile WWW
User avatar

Joined: 2003-09-30 21:33:58
Posts: 351
Post non
could JS mean 'non-nisus' file

_________________
I have never let my schooling interfere with my education/Mark Twain (1835-1910)


2007-11-05 16:27:50
Profile
Official Nisus Person
User avatar

Joined: 2002-07-11 17:14:10
Posts: 4251
Location: San Diego, CA
Post 
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'


2007-11-05 16:54:16
Profile WWW

Joined: 2007-04-12 14:59:36
Posts: 229
Post 
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?


2007-11-06 12:25:36
Profile
Official Nisus Person
User avatar

Joined: 2002-07-11 17:14:10
Posts: 4251
Location: San Diego, CA
Post 
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.


2007-11-06 15:12:40
Profile WWW
User avatar

Joined: 2003-09-30 21:33:58
Posts: 351
Post 
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

_________________
I have never let my schooling interfere with my education/Mark Twain (1835-1910)


2007-11-06 16:12:55
Profile
Official Nisus Person
User avatar

Joined: 2002-07-11 17:14:10
Posts: 4251
Location: San Diego, CA
Post 
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.


2007-11-06 16:18:54
Profile WWW
User avatar

Joined: 2003-09-30 21:33:58
Posts: 351
Post :(
you are absolutely right
and I am still depressed
about it

_________________
I have never let my schooling interfere with my education/Mark Twain (1835-1910)


2007-11-06 18:35:28
Profile

Joined: 2007-04-12 14:59:36
Posts: 229
Post 
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?


2007-11-07 00:33:11
Profile
Official Nisus Person
User avatar

Joined: 2002-07-11 17:14:10
Posts: 4251
Location: San Diego, CA
Post 
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.


2007-11-07 14:49:38
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 11 posts ] 

Who is online

Users browsing this forum: Bing [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software