Hey everyone. I have a slight problem. I need to update an applescript that
was written as a notification system. The program reads off of a spread
sheet and displays a single dance and a partner dance up on a big screen.
Since updating to Maverick I now need to update the script entirely so it
will work properly. Originally I was using growl 1.2.2. It has since
stopped working.
This is the original coding that was written 3 years ago. It was built to
work with Numbers and Excel and looks like this
-- Check if GrowlHelperApp is running
tell application "System Events"
set isRunning to ¬
(count of (every process whose name is "GrowlHelperApp")) > 0
end tell
if isRunning is false then
display dialog "Growl is not running. Please install and run Growl
before running this script." buttons {"Ok"} with title "Oops..." with icon
stop
-- Script exits if Growl isn't installed and running
error number -128
end if
-- Have the user open the spreadsheet we'll be working with
set falias to (choose file with prompt "Select playlist file to open:"
without invisibles)
tell application "Growl"
-- Open the selected spreadhseet and activate the "Playlist" sheet
activate
try
-- If the default Workbook1 is opened, close it
close «class X141» 1 saving no
delay 1
close «class X141» 1 saving no
end try
«event smXLXoTx» given «class 5016»:(falias as text)
«event smXLxACT» «class XwSH» "Playlist"
set nextCell to ""
set bool to false
set strLine to ""
repeat
if strLine = "Close" then return
delay 10
tell «class XwSH» "Playlist" of «class 1172»
repeat with i from 2 to 100
set strX to «class DPVu» of «class X117» ("B" & i) --
Always blank until Play is pressed
set strLine to «class DPVu» of «class X117» ("C" & i)
set strPartner to «class DPVu» of «class X117» ("D" & i)
set strSong to «class DPVu» of «class X117» ("E" & i)
set strTime to «class DPVu» of «class X117» ("F" & i)
-- 0.792638888889 - 7:01:24 PM - 19:01:24 PM
-- ((a1)*1440)/60
if strLine = "Close" then return
if strX = "" then
if i = nextCell then
set bool to true
exit repeat
end if
set bool to false
set nextCell to i
if strLine is not "" then
set nextLine to "Line: " & strLine
else
set nextLine to ""
end if
if strPartner is not "" then
set nextPartner to "Partner: " & strPartner
else
set nextPartner to ""
end if
exit repeat
end if
end repeat
if bool = false then
tell application "Growl" to quit
delay (2)
tell application "Growl" to launch
tell application "Growl"
-- Make a list of all the notification types
-- that this script will ever send:
set the allNotificationsList to ¬
{"Coming Up Next"}
-- 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 ¬
{"Coming Up Next"}
-- Register this script with growl.
-- You can optionally (as here) set a default icon
-- for this script's notifications.
register as application ¬
"Caddy Ranch Next Up" all notifications
allNotificationsList ¬
default notifications enabledNotificationsList ¬
icon of application "Script Editor"
-- Send a Notification...
notify with name ¬
"Coming Up Next" title ¬
"Coming up next..." description ¬
nextLine & "
" & nextPartner application name "Caddy Ranch Next Up" priority 0 icon of
application "iTunes.app" with sticky
end tell
end if
end tell
end repeat
end tell
can anyone help me out?
p.s. I need to get this fixed in a week or the customers will kill me or
just won't leave me alone until I get it fixed
--
You received this message because you are subscribed to the Google Groups
"Growl Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/growldiscuss.
For more options, visit https://groups.google.com/groups/opt_out.