I like to use Applescript to display windows because it is so easy. You can
even call it from a shell script like so:
#!/bin/sh
#script your commands here
touch file1
#this is the window block
/usr/bin/osascript << EOF
tell application "Finder"
activate
display dialog "Running Maintenance Tasks" buttons {"Finish IT!"} with icon
caution
end tell
EOF
#final command runs after button is pressed
touch file2
exit
Here is the pastebin link if the email gets munged.
http://pastebin.com/m454c9c14
Ryan M. Manly
Mac OS X Expert
Glenbrook High Schools
1835 Landwehr Rd.
Glenview, IL 60026
(847) 486-4948
What did you end up doing? I like looking at other's scripts. Gives me fun
ideas. :D
Ryan M. Manly
Mac OS X Expert
Glenbrook High Schools
1835 Landwehr Rd.
Glenview, IL 60026
(847) 486-4948
I sent him some information on using iHook to do the notification. The only
thing that iHook does that I don't like is that it puts an input box on the
page with an OK button. You don't have to put anything in the box, but it
is there. Not sure how to get that off in iHook.
The advantage to using iHook is that if you are already using it for
login/logout hooks you don't have to add anything more, just drop a new
script.
Steve Wood
Director of IT
swood at integer.com
The Integer Group | 1999 Bryan St. | Ste. 1700 | Dallas, TX 75201
T 214.758.6813 | F 214.758.6901 | C 940.312.2475
If you look at the instructions for lexicon use in iHook, there are several
things you add or change. One of those is an Input Box: %INPUT
ENABLE/DISABLE/REMOVE [prompt Title]. You can then read the input. Here's
a little script example they give:
#! /bin/sh
# read user input
echo "%INPUT ENABLE Please enter some text:"
read input
echo "%INPUT DISABLE Processing input..."
do_input_processing ${input}
echo %INPUT REMOVE
Using that you could solicit input from the user and then move on. Also, if
you just wanted to wait for a user to click OK before moving on with your
script, you could use that input box as such. The proof of concept I sent
was to open up Calculator.app after the OK button was pressed. That script
looked like this:
#!/bin/sh
echo "%INPUT ENABLE Please Close All Applications and press OK"
read input
echo "%INPUT DISABLE Processing...."
echo %INPUT REMOVE
open /Applications/Calculator.app
Steve Wood
Director of IT
swood at integer.com
The Integer Group | 1999 Bryan St. | Ste. 1700 | Dallas, TX 75201
T 214.758.6813 | F 214.758.6901 | C 940.312.2475