Entourage and AppleScript in Snow Leopard. Compatibility.

H

hagimeno

Version: 2008
Operating System: Mac OS X 10.6 (Snow Leopard)
Processor: Intel
Email Client: pop

We are developers and we have different apps that works scripting external app (Entourage) and they works perfectly in Tiger and Leopard.
The same apps moved on Snow Leopard has the following problems:

On some machine the target app (Entourage) each time go in timeout and each time processing different message (using the same DB).
On some machines the target app (Entourage) goes in crash.

Now the actors are 3: OS X, the ASS app and Entourage.

We have no tools to understand "where" is the problem.

AS of Entourage has been intensively tested under Snow Leopard? Please check.
We would like to be contacted from MS to reproduce the problem on your machines. It's Entourage that don't respond to AS calls. Maybe there is a bug.

Steve H.
 
D

Diane Ross

This is not an official Microsoft forum. We are regular Entourage users.

So far I haven't had any problems using scripts in Entourage under Snow
Leopard. What are the names of your scripts? If you can provide a download
link, I'm sure someone can tell you if it works for them on Snow Leopard.

I do know some users have had trouble with shell scripts and had to add
"osascript -e" to get the scripts to run under Snow Leopard. I used the same
shell script and it worked for me without editing.
 
W

William Smith [MVP]

We are developers and we have different apps that works scripting
external app (Entourage) and they works perfectly in Tiger and
Leopard. The same apps moved on Snow Leopard has the following
problems:

Snow Leopard has had some major changes to AppleScipt. Just because
Entourage and your script worked under Tiger and Leopard, that doesn't
mean Entourage is the problem when you upgrade to Snow Leopard.

I suggest you start here and read about the AppleScript changes in 10.6
and see if you possibly need to rework some of your code:

<http://developer.apple.com/mac/library/releasenotes/AppleScript/RN-AppleScript/RN-10_6/RN-10_6.html>
or <http://tinyurl.com/mxfk6x>

Hope this helps!

--

bill

Entourage Help Page <http://entourage.mvps.org/>
Entourage Help Blog <http://blog.entourage.mvps.org/>
YouTalk <http://nine.pairlist.net/mailman/listinfo/youtalk>
Twitter: follow <http://twitter.com/meck>
 
H

hagimeno

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 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
 
D

Diane Ross

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.

What is this script supposed to be doing? Was I supposed to select a folder
or message first?

When I ran the script, I got a log from the Activity Monitor, but it's way
too long to post here. If you want it how about giving us someway to contact
you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top