I wrote some scripts on a PowerMac G5 PPC Dual 1.8 running OSX 10.5.8.
I have moved them to a MacMini G4 PPC 1.5 also running OSX 10.5.8… but they fail.
Both computers are running Safari 5.0.6. Can anyone shed any light on this? I am totally stumped.
This is the line of script in question and the error I receive is below:
on SafariWindowHasLoaded(inWindowIndex)
tell application “System Events” to ¬
tell application process “Safari”
set theStatusText to name of static text 1 of group 1 of window inWindowIndex as text
if theStatusText begins with “Contacting” or ¬
theStatusText begins with “Loading” or ¬
theStatusText begins with “Waiting” then
set theReturnValue to false
else
set theReturnValue to true
end if
end tell
return theReturnValue
end SafariWindowHasLoaded
ERROR:
System Events got an error: Can’t get static text 1 of group 1 of window 1 of application process “Safari”. Invalid index.