• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
'load script' fails for Mail rule script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

'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.

  • Follow-Ups:
    • Re: 'load script' fails for Mail rule script
      • From: Jakob Peterhänsel <email@hidden>
    • Re: 'load script' fails for Mail rule script
      • From: Michael Terry <email@hidden>
  • Prev by Date: Re: Scripting Airport Connection
  • Next by Date: iTunes scripting - comparing playlists
  • Previous by thread: Re: Scripting Airport Connection
  • Next by thread: Re: 'load script' fails for Mail rule script
  • Index(es):
    • Date
    • Thread