• 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
Can't compile Mail scripts
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Can't compile Mail scripts


  • Subject: Can't compile Mail scripts
  • From: Stephen Swift <email@hidden>
  • Date: Sat, 15 Feb 2003 17:31:01 -0500

Hello,

I've been trying to write some scripts for Mail, but I keep on getting odd
errors when I try to compile my scripts.

tell application "Mail"
activate
get every mailbox of account 1
--highlights mailbox and the error is "expected class name but found
identifier"
end tell

tell application "Mail"
make new outgoing message
--highlights message and the error is "expected end of line but found
identifier"
end tell

tell application "Mail"
make new message
end tell
--compiles fine but thinks message is a variable

tell application "Mail"
make new attachment
end tell
--compiles fine but thinks attachment is a variable

I almost think that this is just some fluke on my system, but I'm not sure
what would cause it or how to fix it. I just upgraded to 10.2.4 but I
hadn't tried writing scripts for Mail before so I don't know if that's the
problem. I tried to compile a sample script from Apple but it wouldn't.

on open these_items
tell application "Mail"
set the new_message to (make new outgoing message with properties
{visible:true})
--highlights message and the error is: expected "," but found identifier
tell the new_message
tell content
repeat with i from 1 to the count of these_items
set this_file to item i of these_items
make new attachment with properties {file name: this_file } at before the
first character
--highlights : and the error is: expected expression, etc, but found ":"
end repeat
end tell
end tell
end tell
end open

Any help will be greatly appreciated. Thanks in advance!

-Stephen Swift
_______________________________________________
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: Can't compile Mail scripts
      • From: Andrew Oliver <email@hidden>
References: 
 >Re: Q: specifying text in a variable to a color when inserting into Apple's Mail.app? (From: cricket <email@hidden>)

  • Prev by Date: a little puzzled, quark script
  • Next by Date: Re: Can't compile Mail scripts
  • Previous by thread: Re: Q: specifying text in a variable to a color when inserting into Apple's Mail.app?
  • Next by thread: Re: Can't compile Mail scripts
  • Index(es):
    • Date
    • Thread