Title: Single window mode (was Re: Can Entourage X replace Outlook Client?)
I always use my Applescript for opening folders; from a script, a folder still opens in its separate window in EfX. Try, for instance, running this script
Tell application "Microsoft Entourage"
Open folder "Inbox"
End tell
Here's my full open folder script, which pops up a semi-sorted folder list, and lets you type a couple characters to position yourself in the list to select one. The selection by typing ignores special characters like space, "*", or "#" that I use for changing the order folders appear in the folder list. That is, I have a folder called "*Office". To select it, I just run the script, type "off", hit return, and when the folder list pops up, "*Office" is pre-selected, so I just hit return a second time. The folder opens up. This script can be downloaded from my web site (URL below).
(* OPEN FOLDER from list, by Allen Watson, 2/15/00 for OE5.0: <[EMAIL PROTECTED]>
adapted from my Folder List script, which was adapted in turn from: DB Stats by
Dan Crevier <[EMAIL PROTECTED]>
Fixed up for OS X, no osaxen.
*)
global the_folder_name
global myCount
property the_big_list : {}
property faveFolder : "Entourage" -- Name of folder to highlight as default if nothing is entered
on run {}
-- display dialog "Testing"
set myCount to 0
if the_big_list = {} then
set the_folder_name to ""
set AppleScript's text item delimiters to ":" -- Our special folder-name delimiter
display dialog ("Getting list of folders") giving up after 2
set {folderCount} to ProcessFolder(application "Microsoft Entourage")
display dialog ("Sorting list") giving up after 2
set the_big_list to sortL(the_big_list)
end if
try
display dialog ¬
"Type first few characters of desired folder, or if unknown just click OK." & return & "To rebuild folder list, click the REBUILD button after typing." default answer ¬
"" buttons {"REBUILD", "Cancel", "OK"} default button "OK"
set {theButton, pfx} to {button returned of result, text returned of result}
if theButton is "Cancel" then
return
else if theButton is "REBUILD" then
set the_big_list to {}
set the_folder_name to ""
set AppleScript's text item delimiters to ":" -- Our special folder-name delimiter
set {folderCount} to ProcessFolder(application "Microsoft Entourage")
set the_big_list to sortL(the_big_list)
end if
set list2 to {}
repeat with anItem in the_big_list
if (character 1 of anItem) is in {"*", "#", "!"} then set anItem to text 2 thru -2 of anItem
copy anItem to end of list2
end repeat
set theDefault to ""
if pfx is "" then set pfx to faveFolder -- If no prefix entered use my favorite folder
repeat with i from 1 to (count list2)
set anItem to item i of list2
if (anItem as text) begins with pfx then
set theDefault to item i of (the_big_list) as text
exit repeat
end if
end repeat
set the_choice to ¬
choose from list the_big_list default items {theDefault} ¬
with prompt "Choose ONE folder name to open it." without multiple selections allowed and empty selection allowed
--Recursively trace the folder tree for this folder
if result is false then return
my open_folder(the_choice)
on error theMsg
display dialog theMsg
set AppleScript's text item delimiters to ""
end try
set AppleScript's text item delimiters to ""
-- beep 3
end run
on open_folder(the_choice)
set aFolder to ""
set the_choice to the_choice as text
set AppleScript's text item delimiters to ":" -- Our special folder-name delimiter
tell application "Microsoft Entourage"
repeat with i from ((count of text items of the_choice)) to 1 by -1
if aFolder ? "" then
set aFolder to folder (text item i of the_choice) of aFolder
else
set aFolder to folder (text item i of the_choice)
end if
end repeat
(open aFolder) in window 1
end tell
end open_folder
on ProcessFolder(theFolder)
set myCount to myCount + 1
if (myCount mod 25) = 0 then
display dialog "" & myCount & " folders so far" giving up after 2
end if
tell application "Microsoft Entourage"
set folderCount to count folders of theFolder
set folderList to the folders of theFolder
-- set messageCount to 0
if (count of folders of theFolder) > 0 then
--Debug display dialog "Getting subfolders of " & name of theFolder
repeat with f in folderList
set temp to name of f
if (length of the_folder_name) > 0 then
set the_folder_name to temp & ":" & the_folder_name
else
set the_folder_name to temp
end if
copy the_folder_name to end of the_big_list
-- set msgC to count message of f
set {fc} to my ProcessFolder(f)
set folderCount to folderCount + fc
-- set messageCount to messageCount + msgC + mc
if (count of text items in the_folder_name) > 1 then
set the_folder_name to (text items 2 thru -1 of the_folder_name) as text
else
set the_folder_name to ""
end if
end repeat
end if
return {folderCount}
end tell
end ProcessFolder
on sortL(l)
-- beep
if length of l ? 1 then return l
set x to item 1 of l
set ll to rest of l
set l1 to {}
set l2 to {}
repeat with i in ll
if x < i then
set l2 to l2 & i
else
set l1 to l1 & i
end if
end repeat
if length of l1 > 1 then set l1 to sortL(l1)
if length of l2 > 1 then set l2 to sortL(l2)
return l1 & x & l2
end sortL
On or near 11/12/01 10:25 AM, Greg Hammond at [EMAIL PROTECTED] observed:
> Yeah, I know, but not the same. Every time I use my wife's machine which has
> OS 9 and Entourage 2001, I miss that default behavior.
>
> On 11/12/01 10:21 AM, Mark Deniken was willing to say outloud:
>
>> on 11/12/01 1:08 PM, Greg Hammond at [EMAIL PROTECTED] wrote:
>>
>>> Big disappointment, but about the only one I have with Entourage X, except
>>> for that darn forced single window mode.
>>
>> You know that you can click on a folder and it will open in a new window,
>> but you can't have it do this by default tho, it defaults back to single
>> window when you restart.
>>
>> --Mark
>>
>
--
Add me to Palm/Visor: http://signature.coola.com/?[EMAIL PROTECTED]
Allen Watson <[EMAIL PROTECTED]> XNS name: =Allen Watson
Applescripts for Outlook Express and Entourage: <http://homepage.mac.com/allenwatson/>
- Can Entourage X replace Outlook Client? Mail List
- Re: Can Entourage X replace Outlook Client? jud spencer
- Re: Can Entourage X replace Outlook Client? Mark Deniken
- Re: Can Entourage X replace Outlook Client? Greg Hammond
- Re: Can Entourage X replace Outlook Client? Mark Deniken
- Re: Can Entourage X replace Outlook Client? Greg Hammond
- Allen Watson
