Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'An AppleScript to check complete page loading in Safari' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
An AppleScript to check complete page loading in Safari
Authored by: cerniuk on Feb 13, '10 02:13:40PM

Working in Safari 4.0.4 nicely. A slight reorg:

on SafariWindowIsLoading(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 true
else
set theReturnValue to false
end if

end tell

return theReturnValue
end SafariWindowIsLoading


but for some reason I cannot pass the Window in by ID and then get the property of Window id inWindowID



[ Reply to This | # ]
An AppleScript to check complete page loading in Safari
Authored by: cerniuk on Feb 13, '10 02:37:55PM

using the index of the window (aka 1, 2, 3) works but simply getting the name of the window and using the name form:

set theWindowName to the name of window 1
set theStatusText to name of static text 1 of group 1 of window theWindowName as text



[ Reply to This | # ]