Re: 'load script' fails for Mail rule script
Re: 'load script' fails for Mail rule script
- Subject: Re: 'load script' fails for Mail rule script
- From: Lachlan Deck <email@hidden>
- Date: Mon, 16 Feb 2004 22:27:06 +1100
Hi there,
On Monday, February 16, 2004, at 07:37 PM, Michael Terry wrote:
On Feb 15, 2004, at 11:58 PM, Lachlan Deck wrote:
property LDUtil: <some valid path slash style>
property DEBUG: true
property DEBUG_MESSAGE: "Hi"
on debugMsg()
if DEBUG then tell app "Mail" ,
to display dialog DEBUG_MESSAGE
end debugMsg
on perform_mail_action(info)
tell application "Mail"
my debugMsg()
-- fails on next line...
set utilScript to load script (POSIX file LDUtil)
my debugMsg() -- never seen
end tell
end perform_mail_action
Just to test exactly what's going on, what if you change it to:
set utilScript to load script (choose file)
Yes that works. Adjusting my property declarations to Apple style paths
- which is a bit longer :-/ - also works with the following:
set utilScript to load script (file LDUtil)
I figured out that by moving the load script call before the tell app
"Mail" statements (with POSIX style paths) also works. Otherwise the
error message is as follows:
-1700 Mail got an error: Can't make <<class psfx>>
"/path/to/script.scpt" into a file.
Thanks for your help...
with regards,
--
Lachlan Deck
email@hidden
_______________________________________________
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.