• 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
Re: 'load script' fails for Mail rule script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Re: 'load script' fails for Mail rule script (From: Michael Terry <email@hidden>)

  • Prev by Date: Re: Scripting Airport Connection
  • Next by Date: Re: addendum to iTunes scripting
  • Previous by thread: Re: 'load script' fails for Mail rule script
  • Next by thread: Re: 'load script' fails for Mail rule script
  • Index(es):
    • Date
    • Thread