can applescript select a link within a google search?

Jacques showed me how you can select different pages in a google search with this:

set myPage to 4
set Google_Page_link to ((ASCII character 10) & myPage) as string

tell application "Safari"
	set the link_count to (do JavaScript "document.links.length" in document 1)
	repeat with i from 0 to (the link_count - 1)
		if (do JavaScript "document.links[" & (i as string) & "].text" in document 1) is Google_Page_link then
			set URL of document 1 to (do JavaScript "document.links[" & (i as string) & "].href" in document 1) -- go to this page
			exit repeat
		end if
	end repeat
end tell

Is there a way to get it to select a specified link within the page of the search results? Lets say page 1 has 10 results, can applescript select open the third?

Jacques, I noticed one funny thing about that script I posted at the top. It will not let you go more than 10 pages away from where you are. So, lets say you are on page 2 and want to go to page 50, it will just keep on going to page 2. You could go to page 12, and continue to work up in 10’s, but that is redundant. Do you know if there is a way around this? I dont not understand Java and some of the other stuff in this script. Thanks! Ian

Thanks! I can write a loop that will take it up to that page by 10’s. No problem! Thanks!