For those of you not familiar with applescript, you open up the included software called 'Script Editor', put this code inside it by copy/paste, then press 'Save As' and then shoose 'Save As Application' or 'Run Only'
It will create a little app that executes this script.
Let me know if it works.
** ONLY WORKS IN OSX RUNNING NEW VERSION OF SAFARI
Oh, what does it do:
It opens up the main gearslutz categories in new tabs in safari
_________________________
property timeout_value : 60
tell application "Safari"
activate
try
if not (exists document 1) then
make new document at the beginning of documents
end if
set the URL of the front document to "https://www.gearslutz.com"
delay 2
if my page_loaded(timeout_value) is false then error "The page did not load in the indicated timeout value."
set the links_count to (do JavaScript "document.links.length" in document 1) as integer
set the links_list to {}
if the links_count is not 0 then
repeat with i from 0 to (the links_count - 1)
set this_link to (do JavaScript ("document.links[" & (i as string) & "].href") in document 1)
if this_link contains "forumdisplay" and this_link is not in the links_list and this_link does not contain "16" and this_link does not contain "7" and this_link does not contain "8" and this_link does not contain "20" then
set the end of the links_list to this_link
end if
end repeat
end if
close document 1
make new document at the beginning of documents
repeat with i from 1 to the number of items in links_list
set this_item to item i of links_list
if i is 1 then
set the URL of the front document to "https://www.gearslutz.com/board/" & this_item
else
set this_URL to "https://www.gearslutz.com/board/" & this_item
my new_tab()
set the URL of document 1 to this_URL
end if
end repeat
on error the error_message number the error_number
if the error_number is not -128 then
set the error_text to "Error: " & the error_number & ". " & the error_message
display dialog the error_text buttons {"Cancel"} default button 1
end if
end try
end tell
on page_loaded(timeout_value)
repeat with i from 1 to the timeout_value
tell application "Safari"
if (do JavaScript "document.readyState" in document 1) is "complete" then
return true
else if i is the timeout_value then
return false
else
delay 1
end if
end tell
end repeat
return false
end page_loaded
on new_tab()
tell application "Safari" to activate
tell application "System Events"
tell process "Safari"
click menu item "New Tab" of menu "File" of menu bar 1
end tell
end tell
end new_tab
Hmmm...I should clarify my post. When I wrote "Nice one, Bev!", I meant cool idea. This was before trying to run it. No joy here either....
I have Safari 1.0 Beta 2 (v73) and use tabs all the time, so that's not the issue. The script is not able to be opened in the AppleScript editor as it's read-only.
It works fine when i drag it out of my idisk, but it does some kind of its own wierd compression on it when you download it from the web page.
So I stuffed it myself and stuck it up.
Now try.
Oh and it was Beck doing an acoustic set. He twiddled around on piano and a bit of rhodes, made some strange noises with a drum machine, and played a wierd wind organ thing. And sang Loser.