Apple Script Help - Opening a URL in google when found within search results

Hello-


I'm a newby to apple scripts - what I need is to open safari and search for a specific term. In this case I'm using "Get Fit Harford". When I find my url "http://www.getfitharford.com" within the google results, I need the script to open that page, and repeat the process for the next term.


Here's what I have now:


tell application "Safari"

open location "http://www.google.com/#hl=en&sclient=psy-ab&q=get+fit+bootcamp+harford&oq=get+fi t+bootcamp+harford&"

end tell




Any help is appreciated.

MacBook Pro, Mac OS X (10.7.4), 8 GB Ram

Posted on Jul 19, 2012 7:13 AM

Reply
4 replies

Jul 19, 2012 7:58 AM in response to ryanblankenship

This should give you something to start with. I don't have any suggestions on how to find your url amongst the search results, it seems like there are still things you need people for 😉 .


set searchList to {"Get Fit Harford", "search 2", "search 3"}

tell application "Safari"

activate

repeat with aSearch in searchList

search the web for aSearch in current tab of front window

-- find your url

end repeat

end tell

Jul 19, 2012 11:16 AM in response to adayzdone

Yes, I understand that. Not planning on using this as a repetitive thing. A script I can give to a few of our guys around the country to run once or twice a week. I've been down the "outsmarting google" road before. They don't necessarily penalize you, but your rankings go up falsely, and they catch it and eventually bring it back to where it belongs.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Apple Script Help - Opening a URL in google when found within search results

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.