I have a script that prints all tabs in front window of Safari, but since updating to 10.8 (now 10.8.3) it hangs Safari and prints nothing.
Anyone else able to recreate or seen this issue?
Thanks
repeat 1 times
set Safari_front_window_id to "FFF"
try
tell application "Safari" to get id of front window
set Safari_front_window_id to result
end try
repeat 500 times
try
tell application "Safari" to get id of front window
set new_Safari_front_window_id to result
if new_Safari_front_window_id ≠Safari_front_window_id then exit repeat
on error
exit repeat
end try
try
tell front window of application "Safari" to set current tab to tab 1
tell front window of application "Safari" to get name of tab 1
set tab_name_02 to result
log "tab_name_02 = " & tab_name_02
on error
set tab_name_02 to "None" as string
log "tab_name_02 = " & tab_name_02
end try
if tab_name_02 ≠"None" then
tell application "Safari"
print front window
end tell
delay 2
repeat 3 times
try
tell front window of application "Safari" to get name of tab 1
set tab_name_02 to result as string
log "tab_name_02 = " & tab_name_02
on error
set tab_name_02 to "Error" as string
log "tab_name_02 = " & tab_name_02
beep
delay 2
end try
if tab_name_02 ≠"Error" then exit repeat
end repeat
tell application "Safari"
close tab 1 of window id new_Safari_front_window_id without saving
end tell
end if
if tab_name_02 = "None" then exit repeat
end repeat
end repeat
beep 3
Model: MacBook Pro 17’ 2011
AppleScript: 2.2.4
Browser: Safari 536.29.13
Operating System: Mac OS X (10.8)