Make an app window minimized to dock max and come to the front?
Make an app window minimized to dock max and come to the front?
- Subject: Make an app window minimized to dock max and come to the front?
- From: Andrew Hinton <email@hidden>
- Date: Fri, 11 Jan 2002 11:19:22 -0500
I'm working on a script to take an email in Entourage and create a quick
Now-Up-To-Date event out of it. It's working pretty well so far, but one
thing I wish I could do is get the NUD calendar to pop to the front at the
end of the script. Activate or something ought to do it, right? But when
it's docked, the window just stays in there.
This is an important step because I need to be able to edit the event easily
(and check that it was created in the right spot) before I assume it's in
NUD correctly.
I'm an extreme novice at this, so pardon me if I haven't explained it quite
right.
I really want to make Entourage and NUD work together better like this, but
I'm having trouble scripting things like Event categories, etc.
(To answer the inevitable question: Why am I using NUD instead of
Entourage's calendar? Because it syncs better with my Palm, and I like the
interface, etc. much better.)
Here's the script I have so far, by the way (some of which is borrowed from
other scripts):
tell application "Microsoft Entourage"
-- get the currently selected message or messages
set selectedMessages to current messages
-- if there are no messages selected, warn the user and then quit
if selectedMessages is {} then
display dialog "Please select a message first and then run this
script." with icon 1
return
end if
repeat with theMessage in selectedMessages
-- get the information from the message, and store it in variables
set theName to subject of theMessage
set theContent to content of theMessage
end repeat
end tell
tell application "Now Up-to-Date - OS X"
set eventRef to make new event at category 1 of document 1 ,
with properties {eventtype:"Appointment"}
set name of eventRef to theName
set description of eventRef to theContent
end tell
--
email@hidden
www.drewspace.com