Opening Nisus with a shortcut?

Everything related to our flagship word processor.
Post Reply
js
Posts: 260
Joined: 2007-04-12 14:59:36

Opening Nisus with a shortcut?

Post by js »

Is it possible to open Nisus itself (or any application for that) with a shortcut from the finder?
Agnostus
Posts: 50
Joined: 2006-03-16 01:00:50
Location: Lawrence, KS
Contact:

Re: Opening Nisus with a shortcut?

Post by Agnostus »

You could try using spotlight: just trigger spotlight using the according key combination, then start typing nisus, once it is selected (if not automatically, use the arrow keys) hit return. This way, you can start any app or open documents. If you want something moe sophisticated, there are a number of launcher apps; personally I like launchbar (http://www.obdev.at/products/launchbar/index.html) which behaves a bit like the spotlight trick described above, but there are also things that work differently. I think you can define keuyboard shortcuts in some of these.

Martin
Kino
Posts: 400
Joined: 2008-05-17 04:02:32

Re: Opening Nisus with a shortcut?

Post by Kino »

js wrote:Is it possible to open Nisus itself (or any application for that) with a shortcut from the finder?
Yes. I used to do something like this.

1. Download FastScripts (http://www.red-sweater.com/fastscripts/) and put it somewhere under one of Applications folder.

It is a better replacement of Script Menu (/System/Library/CoreServices/Menu Extras/Script Menu.menu) and allows you to assign keyboard shortcuts to up to 10 scripts in freeware mode. It would be handy to add it to your login items.

2. Create a folder /Users/you/Library/Scripts/Applications/Finder/ and put a shell script like this (attached) in it.

Code: Select all

#! /bin/sh
open -a 'Nisus Writer Pro.app'
OpenNWP-sh.zip
(195 Bytes) Downloaded 710 times
3. Test the script to see if it works as expected. If it does not work, it is very likely that the script file is not executable. If you don't have a utility for setting executable bit, try the following macro:

Code: Select all

## Make Executable ###

# Make executable file(s) you have selected in Choose Files dialog.

Require Pro Version 1.2

$doc = Document.active
$folder = '~/Documents'
if $doc != undefined
	if $doc.filePath != undefined
		$folder = $doc.filePath.filePathByRemovingLastComponent
	end
end

$files = Choose Files $folder, 'Make Executable'

if $files
	Set Exported Perl Variables 'files'
	begin Perl
		foreach $file (@files) {
			`/bin/chmod a+x "$file"`;
		}
	end
end

### end of macro ###
4. Add a shortcut to the script in FastScripts' Preferences.
Kino
Posts: 400
Joined: 2008-05-17 04:02:32

Re: Opening Nisus with a shortcut?

Post by Kino »

If you, not necessarily the original poster, want to let Nisus Writer Pro open file(s) selected in the Finder using a keyboard shortcut, you can use an AppleScript like this at the step 2 instead of the shell script.

Code: Select all

tell application "Finder"
	set selectedItems to selection
	repeat with i in selectedItems
		open i using application file id "com.nisus.NisusWriter"
	end repeat
end tell
OpenInNWP-scpt.zip
(1.67 KiB) Downloaded 754 times
As I'm not familiar with AppleScript, I just modified a script found at http://pixelignition.net/apple/applescript.
js
Posts: 260
Joined: 2007-04-12 14:59:36

Re: Opening Nisus with a shortcut?

Post by js »

Sorry, I don't quite understand the procedure for this:
2. Create a folder /Users/you/Library/Scripts/Applications/Finder/ and put a shell script like this (attached) in it.
Kino
Posts: 400
Joined: 2008-05-17 04:02:32

Re: Opening Nisus with a shortcut?

Post by Kino »

1. Create "Scripts" folder under "Library" folder in your home (not at the root level);
2. Create "Applications" folder under "Scripts" folder just created;
3. Create "Finder" folder under "Applications" folder just created;
4. Put OpenNWP.sh in "Finder" folder just created.

Alternatively, you can run the following NW Pro macro which will create those folders, generate the script and make it executable.

Code: Select all

$script = "#!/bin/sh\n\nopen -a 'Nisus Writer Pro.app'\n"
$path = User Property 'home folder path'
$path &= '/Library/Scripts/Applications/Finder/OpenNWP.sh'
File.writeDataToPath $script, $path # parent folders will be created automatically
begin Perl
	`/bin/chmod a+x "$path"`; # set executable bit
end
js
Posts: 260
Joined: 2007-04-12 14:59:36

Re: Opening Nisus with a shortcut?

Post by js »

Thanks, Kino. This works really fast.
Bob Stern
Posts: 182
Joined: 2006-03-12 12:32:47

Quicksilver is another good launcher app

Post by Bob Stern »

http://docs.blacktree.com/quicksilver/w ... uicksilver

It's a perpetual beta, but it's solid and it's free.
counterpt
Posts: 15
Joined: 2008-04-20 13:00:58

Re: Quicksilver is another good launcher app

Post by counterpt »

Bob Stern wrote:http://docs.blacktree.com/quicksilver/w ... uicksilver

It's a perpetual beta, but it's solid and it's free.
I just want to second the suggestion, I've used quicksilver for years now. You can find tutorials in youtube since the program comes with no instructions....
Post Reply