Hi, I have a problem. I want to get the subfolder of folder “InBox”
This is my snippet :
tell application “Microsoft Entourage”
set FoldersList to “” as string
repeat with i in every folder
set FoldersList to name of i
tell FoldersList
repeat with z in folder of FoldersList
set FoldersList2 to name of z
end repeat
end tell
end repeat
end tell
When i try to run this script I get this exception The error is “Impossible to get folder of Inbox”
I may be wrong since I don’t have Entourage, but it seems to me that:
tell application "Microsoft Entourage"
set FoldersList to "" as string -- this is setting FoldersList to a string as opposed to a list of folders.
repeat with i in every folder
set FoldersList to name of i
tell FoldersList
repeat with z in folder of FoldersList -- this is treating FoldersList as a list instead of a string. You're looking for a folder in the list of folders.
set FoldersList2 to name of z
end repeat
end tell
end repeat
end tell
Maybe try:
set FoldersList to {}
set FoldersList2 to {}
tell application "Microsoft Entourage"
repeat with i in FoldersList
tell application "Finder"
if class of i is folder then
set FoldersList2 to FoldersList2 & i
end if
end tell
end repeat
end tell
Of course I don’t know the rest of your code so I don’t know where you’re referencing FoldersList and the Inbox folder. I can’t test the code since I don’t have Entourage but this may help.