'load script' fails for Mail rule script
'load script' fails for Mail rule script
- Subject: 'load script' fails for Mail rule script
- From: Lachlan Deck <email@hidden>
- Date: Mon, 16 Feb 2004 18:58:43 +1100
Hi all,
I'm setting up some Mail rules - some using AppleScripts for some
custom filtering etc.
Anyway, I'm finding that the load script directive fails when used with
a rule script but is fine otherwise - so how do I take advantage of
'code-reuse' with such a script rather than having to cut and paste the
code?
Thanks. Here's a simplified example of what I'm doing....
property utilScriptFolder: "/Applications/AppleScript/Example
Scripts/Mail Scripts/Rules/utils/"
property LDUtil: utilScriptFolder & "LDUtil.scpt"
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
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.