need a fix in this entourage script
need a fix in this entourage script
- Subject: need a fix in this entourage script
- From: Salánki Benjámin <email@hidden>
- Date: Tue, 21 May 2002 14:03:06 +0200
Hi!
I am a cocoa developer playing around with AppleScript. Now want to get
all unread count from my Entourage mailboxes. I wrote this little script:
property FolderCount : 0
property UnreadCount : 0
property FolderNumber : 0
property TotalUnreadCount : 0
on activated theObject
tell application "Microsoft Entourage"
set FolderCount to number of folders
repeat FolderCount times
try
set FolderNumber to (FolderNumber + 1)
set UnreadCount to unread message count of folder id (FolderNumber)
set TotalUnreadCount to TotalUnreadCount + UnreadCount
end try
end repeat
end tell
tell window "mailwindow"
set contents of text field "foldercounter" to TotalUnreadCount
end tell
end activated
No what I thought I was doing is that I get how many folders I have in
Entourage (starting with id 1 as the inbox...), then repeat my script as
many times as i have folders, and get the unread count of each
individual folder, add them up and write out my unread count to my text
field in my window. Now this is not happening. In fact all that's going
on is that Entourage keeps crashing and quitting everytime I run the
script. The strange thing is that if i put an integer, like 1 or 2
instead of FolderNumber, the app works, but only for the folder I
specified the ID for. So I guess my syntax is alright, by why does
Entourage keep crashing on me?
Thanks in advance for all comments,
stupidFish23
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.