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


Click here to return to the 'GUI scripting can do it but it's to obnoxious' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
GUI scripting can do it but it's to obnoxious
Authored by: robJ on Apr 15, '03 06:19:18PM
I know that GUI scripting would be too intrusive for this particular task but it does make it possible to gather info from a multi-tab window. :-)

set targetURLs to {}
tell application "Safari" to activate

tell application "System Events" to tell application process "Safari"
set tabNames to name of radio buttons of window 1
end tell

tell application "Safari"
repeat with thisTab in tabNames
tell application "System Events"
tell application process "Safari"
tell radio button named thisTab of window 1 to click
end tell
end tell
copy {aURL:URL of document of window named thisTab, aTab:contents of thisTab} to end of targetURLs
end repeat
end tell
targetURLs


The script will gather the page name and URL for window 1 in Safari.

[ Reply to This | # ]