• 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
Weird scripting effect with Mail
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Weird scripting effect with Mail


  • Subject: Weird scripting effect with Mail
  • From: Patrick Gibson <email@hidden>
  • Date: Wed, 13 Oct 2004 16:30:21 -0700

This is pretty obscure, but consider the following script:

tell application "Mail"
	set theCount to the count of every outgoing message
	repeat with i from 1 to theCount
		set theTo to the to recipients of outgoing message i
		-- do other things here
	end repeat
end tell

For some reason, the "set theTo to the to recipients of outgoing message i" line causes the cursor in the active outgoing message to return to the beginning of the message. This normally wouldn't be a big deal; however, this snippet of code is part of a bigger script I have running in the background. (The script itself records what I'm doing every minute so it will be easier for me to do my timesheets at the end of the day.) As a result of this weird behaviour, if I'm typing a message (as I am now) and the script runs, my cursor is thrown back to the beginning of the message, which is particularly annoying while I'm in the middle of a sentence!

Getting "the subject of outgoing message i" does not have this same effect; just when I query the recipients. Anyone have any thoughts (short of filing a bug report, which I will do) as to a way I can get around this? Worst case scenario I guess will be that I won't be able to log the recipient of the message, which would be a crying shame. ;)

Thanks,

Patrick

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: [Admin] Re: HELP - unsubscribe
  • Next by Date: Re: [Admin] Re: HELP - unsubscribe
  • Previous by thread: Re: Month arithmetic addendum
  • Next by thread: filemaker 7 scripting
  • Index(es):
    • Date
    • Thread