ASS apps running in Snow Leopard. Timeout troubles.

Hi all,

I have compiled apps created in ASS 3.0 that works without any errors under 10.5
Now in Snow Leopard I receive random AS Timeout Error. Each time n a different “position” processing data. The apps calls in this case Entourage 2008 with latest patch.
The Snow Leopard is “Fresh and Clean” without any 3rd parts sw installed.

Somebody has suggestions?

Steve H.

While the current version of XCode doesn’t offer AS Studio as an option, it should still compile old code. Have you tried to re-compile?

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 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
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
	end repeat
end if

end StructureRecursive


I found a whole bunch of articles/forum messages around the web about similar incompatibilities with Entourage. I’d say the fault lies with Entourage not being fully compatible with 10.6. Try googling the phrase “snow leopard entourage applescript fails” and see if any of the results describe your problem.

Good luck. Tracking these things down after an OS upgrade always sucks. But we’re scripters, and we will prevail! :cool: