Previous efforts to save all Safari tabs have been tricky at least, but this hint from MacOSXhints
http://www.macosxhints.com/article.php?story=20060822221657667#comments
gives new hope:
tell application "System Events" to tell process "Safari"
click menu item "Activity" of menu "Windows" of menu bar 1
keystroke "a" using {command down}
keystroke "c" using {command down}
keystroke "w" using {command down}
end tell
However, grabbing all entries in the Activity window does not always work: all arrows in the Activity window must be closed otherwise the expanded entries save all spurious stuff (individual graphics and webpage objects) in the bookmark list. How do we accomplish with GUI scripting that all arrows are closed…?
UI Browser sees a lot of unnamed UI elements…