Estoy buscando un poco de ayuda en la corrección de este error:
error "el Sistema de Eventos de un error: no se Puede obtener el elemento de menú \"Borrar Historial...\" de menú \"Safari\" de la barra de menú 1 del proceso de \"Safari\"." el número de -1728 de elemento de menú "Borrar Historial..." del menú "Safari" de la barra de menú 1 del proceso de "Safari"
Mi código es:
tell application "Safari"
launch
activate
if not (exists document 1) then
make new document at front
end if
end tell
delay 1
tell application "System Events"
keystroke "e" using {option down, command down}
tell process "Safari"
tell menu bar 1
tell menu "Safari"
tell menu item "Clear History..."
click
every UI element
end tell
end tell
end tell
tell window 1
tell sheet 1
tell button "Clear History"
click
end tell
end tell
end tell
tell menu bar 1
tell menu bar item "Develop"
tell menu 1
click menu item "Empty Caches"
end tell
end tell
end tell
end tell
end tell