• 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
Applescript compatibility under Snow Leopard
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Applescript compatibility under Snow Leopard


  • Subject: Applescript compatibility under Snow Leopard
  • From: Hagimeno <email@hidden>
  • Date: Wed, 23 Sep 2009 20:59:49 +0000 (GMT)

Hi,
after some days and a lot of tests on both Leopard and Snow Leopard, finally we have isolated the problem. We suppose that the problem is caused by AppleScript when running under Snow Leopard. But we can't be 100% sure.

We post here below the AS script, made by Script Editor (that is the smallest version of our real ASS application).
It gets information from each message in the Entourage database. It has been successfully tested a lot of times (and it run without problem every day in last years) under Leopard with many different identities containing thousands of emails. It did run perfectly.
No problem at all. Instead, running on Snow Leopard, the same AS script simply causes Entourage to go to timeout, generating the -1712 error.
We tried both the 32 and 64 bit versions of our script on Snow Leopard. Same bad result. A few times it works, some other times it goes to timeout.
All the tests have been executed on different "clean" Macs (iMac, Mac Pro, Mac Book Pro) with Snow Leopard 10.6.1 and Entourage 2008 12.2.1. We heard that some others users have had troubles about timeout after running their scripts/apps on Snow Leopard.

Please, can somebody tell us whether this trouble is caused by an AppleScript's bug when running on Snow Leopard? Or can the trouble related to the AppleScript scriptability of 3rd parts applications (Entourage, Photoshop...) that are not fully compatible with Snow Leopard?
Any answer or feedback would be greatly welcome. Thank you.

Please find here below the AS script we used on our tests:

property pEntourageStructure : missing value

tell application "Microsoft Entourage"
	set folderList to (ID of every folder) as list
end tell

set pEntourageStructure to {}
set numFolders to count folderList
repeat with j from 1 to numFolders
	set entourageFolderID to item j of folderList
	StructureRecursive(entourageFolderID)
end repeat

set numFolders to count pEntourageStructure

set t1 to current date

repeat with j from 1 to numFolders
	set folderID to item 2 of item j of pEntourageStructure

	tell application "Microsoft Entourage"
		set pFolderMessages to count messages in folder id folderID
	end tell

	repeat with m from 1 to pFolderMessages
		tell application "Microsoft Entourage"

			tell message m of folder id folderID
				set emailID to ID
			end tell

			-- Capture Categories
			set categoryList to category of message id emailID

			-- Capture Dates and Class
			tell message id emailID
				set emailSentDate to time sent
				set emailReceivedDate to time received
				set numAttachments to count attachments

				if class is incoming message then
					set emailClass to "incoming message" as string
				else if class is outgoing message then
					set emailClass to "outgoing message" as string
				end if

				-- Capture Sender
				set displayName to (display name of sender) as Unicode text
				set displayEmail to address of sender

				-- Capture Subject and Body
				set subjectRecipient to subject
				set contentRecipient to content

			end tell
		end tell
	end repeat
end repeat

set t2 to current date
set t3 to t2 - t1

on StructureRecursive(myObject)
	tell application "Microsoft Entourage"
		set folderName to name of folder id myObject
		set numItem to count folders in folder id myObject
	end tell

	copy {folderName, myObject} to end of pEntourageStructure

	if numItem > 0 then
		tell application "Microsoft Entourage"
			set folderList to (ID of every folder in folder id myObject) as list
		end tell
		repeat with i from 1 to numItem
			set idObject to item i of folderList
			StructureRecursive(idObject)
		end repeat
	end if
end StructureRecursive





 _______________________________________________
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

  • Follow-Ups:
    • Re: Applescript compatibility under Snow Leopard
      • From: Simon Topliss <email@hidden>
    • Re: Applescript compatibility under Snow Leopard
      • From: CYB <email@hidden>
  • Prev by Date: Variables & quotes
  • Next by Date: Re: Variables & quotes
  • Previous by thread: Re: Variables & quotes
  • Next by thread: Re: Applescript compatibility under Snow Leopard
  • Index(es):
    • Date
    • Thread