Applescripting FileMaker to Nisus
Applescripting FileMaker to Nisus
- Subject: Applescripting FileMaker to Nisus
- From: OzSprings <email@hidden>
- Date: Sun, 3 Mar 2002 14:01:24 +0000
Hi
I am new to this list and to AppleScript but not to Nisus which I
have been using for several years.
What I have been trying unsuccessfully to do is create an AppleScript
which will open a Nisus document and then goes straightaway to a
nominated bookmark. I have tried using the message in "Try" (as in
the sample script which came with Nisus 6.5) and without it, but each
time AppleScript says at the "do menu" command: "Expected end of
line, etc. but found class name" -- highlighting the word "menu".
This result is the same if I point to the named bookmark which is
part of the Nisus Menu, or to a macro, also part of the Nisus Menu.
This script is part of one which I would like to relate my Nisus
documents to a substantial FileMaker Pro database in which sections
of a group of Nisus documents relate to one or more records (000s).
I have created a field in FM Pro in which I can store the "open
document" AppleScript for each record. This works, but I can't get
the script to go to the bookmarked part of the Nisus document.
For some reason FileMaker will not recognise Nisus as an application
if I use its "Open application..." FMP scripting dialog box, but it
does recognise Microsoft Word. I have got beyond this limitation by
using an AppleScript in an FMP field.
In case this is of any help, below is the one and only sample
AppleScript which comes with Nisus 6.5:
on run
try
tell application "Nisus. Writer 6.5"
activate -- bring Nisus. Writer to the foreground
new document "My Document"
-- with the do menu command you can execute
any Nisus. Writer menu
do menu "New York"
do menu "18" -- change the size to 18
do menu "Blue"
do script "Key Welcome to Nisus Writer"
-- with do script you can run Nisus. Writer macros
do script "Key " -- this is a way that you
can insert a carriage return
select all
copy selection
do menu "36"
end tell
on error -- error checking
set str to "There was an error running this Apple Script"
error str
end try
end run
Strangely enough, if I save the "My document" on my startup disk then
this script opens this document rather than creating a new one and
adds the "Welcome" message to the end of the text already there.
Many thanks for any help with my particular AppleScript.
Oz
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.