• 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: Script doesn't work in Leopard anymore...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Script doesn't work in Leopard anymore...


  • Subject: Re: Script doesn't work in Leopard anymore...
  • From: Phil <email@hidden>
  • Date: Mon, 7 Jan 2008 19:07:18 -0500

I just realized that I have a script-based rule that is still working in Leopard and took a look to see what I was doing differently.  Try this:

using terms from application "Mail"
on perform mail action with messages selectedMessages for rule theRule
tell application "Mail"
set selectedMsgs to selection
repeat with msg in selectedMsgs
set theSubject to subject of msg
set theSender to extract name from sender of msg
set theAddress to extract address from sender of msg
set theDate to date sent of msg
set nowDate to current date
set theBody to "Uw bericht" & return & return & "Onderwerp: " & theSubject & return & "Verstuurd: " & theDate & return & return & "is ontvangen op " & nowDate & ".  


Met vriendelijke groet,
Van Hooren drukkerij en repro bv

" & return
set newMessage to make new outgoing message with properties {subject:"Ontvangstbevestiging: " & theSubject, content:theBody & return & return}
tell newMessage
set visible to true
make new to recipient at end of to recipients with properties {name:theSender, address:theAddress}
end tell
--send newMessage
end repeat
end tell
end perform mail action with messages
end using terms from

That got your script working for me. (I moved the tell block to encompass everything you're asking mail to do and added the 'for rule theRule' clause)

Phil

On Jan 7, 2008, at 4:06 PM, J. Huisman wrote:

Hello Phil,

Thanks for your response.

At least your manual version works alright, but unfortunately I would love to see it run as a rule. (I don't know how to run it via iCal, as you mentioned)
I'ts too busy to, manually, respond every mail I receive...
I've seen the thread  on Apple discussions, those are the ones I referred to in my mail, I even started a thread myself:
http://discussions.apple.com/thread.jspa?threadID=1276298&tstart=45  (With the wrong 'message' instead of 'msg', It was right (msg) in the original version, I've messed around a bit and copied the wrong one in the maillist...)

I'd lthink I'll send a bug report, to both the Mail- and Applescript folks.

Thanks for your help'

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Re: Script doesn't work in Leopard anymore... (From: "J. Huisman" <email@hidden>)
 >Re: Script doesn't work in Leopard anymore... (From: "J. Huisman" <email@hidden>)

  • Prev by Date: Re: Excel Columns into Lists
  • Next by Date: Re: Trouble with Lists in Excel
  • Previous by thread: Re: Script doesn't work in Leopard anymore...
  • Next by thread: Re: Script doesn't work in Leopard anymore...
  • Index(es):
    • Date
    • Thread