Hi there
I have just finished this script below for opening Opera in full screen (kiosk) mode with a specified web site (Spelling Bee). It could be used for any web site of course. If you save the script as an application bundle (run only), run it through Dock Dodger, then give it a nice icon, it works well for kids. Requires Growl or else remove the Growl notification parts. Tested on 10.5 and 10.6.
Cheers
(*
Set webaddress to the address you wish to use. Save as application bundle with name you want to give it. Treat with Dock Dodger to prevent it appearing in Dock when launched.
*)
set webaddress to "[url=http://www.timesspellingbee.co.uk/Profile/Login.aspx?ReturnUrl=%2fDefault.aspx]www.timesspellingbee.co.uk/Profile/Login.aspx?ReturnUrl=%2fDefault.aspx[/url]"
tell application "System Events"
if (exists process "Opera") then
beep
my notify(1, "")
activate
display dialog "Restart Opera Kiosk" default button "Cancel" giving up after 10
if button returned of result is "OK" then
my notify(3, "")
tell application "Opera" to quit
delay 1
my notify(2, webaddress)
do shell script "exec /Applications/Opera.app/Contents/MacOS/Opera -k \"" & webaddress & "\" &> /dev/null &"
end if
else
my notify(2, webaddress)
do shell script "exec /Applications/Opera.app/Contents/MacOS/Opera -k \"" & webaddress & "\" &> /dev/null &"
end if
end tell
on notify(messNum, webaddress)
tell application "GrowlHelperApp"
-- Make a list of all the notification types
-- that this script will ever send:
set the allNotificationsList to ¬
{"OperaRunning", "LaunchKiosk", "ShutdownKiosk"}
-- Make a list of the notifications
-- that will be enabled by default.
-- Those not enabled by default can be enabled later
-- in the 'Applications' tab of the growl prefpane.
set the enabledNotificationsList to {"OperaRunning", "LaunchKiosk", "ShutdownKiosk"}
-- Register our script with growl.
-- You can optionally (as here) set a default icon
-- for this script's notifications.
register as application ¬
"OperaKiosk" all notifications allNotificationsList ¬
default notifications enabledNotificationsList ¬
icon of application "Opera"
--Send a Notification...
if messNum is 1 then
notify with name ¬
"OperaRunning" title ¬
"Opera" description ¬
"Opera Running" & return & "OPERA RUNNING" application name "OperaKiosk"
else if messNum is 2 then
notify with name ¬
"LaunchKiosk" title ¬
"Opera" description ¬
"LAUNCHING OPERA KIOSK" & return & return & webaddress application name "OperaKiosk"
else if messNum is 3 then
notify with name ¬
"LaunchKiosk" title ¬
"Opera" description ¬
"SHUTTING DOWN OPERA KIOSK" application name "OperaKiosk"
end if
end tell
end notify