• 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: "J. Huisman" <email@hidden>
  • Date: Tue, 8 Jan 2008 20:45:49 +0100

Hi Phil,
Thanks for all your hard work.
Your last message gave me hope but... unfortunately it doesn't work.
I don't know what's different but I can't seem to make it run on my mac... I kopied the data into a new applescript doc, save it as a scriptfile but it just doesn't work...
Would it be possible if you send me your working scriptfile by e-mail? I don't know what I could do wrong...

Thanks, Juun


Op 8 jan 2008, om 00:47 heeft Phil het volgende geschreven:

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
 _______________________________________________
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: Apple remote desktop script?
  • Next by Date: Re: file sorting via applescript?
  • 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