Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

wrldwzrd89

macrumors G5
Original poster
Does anyone know how to do the following in AppleScript:

Open a web browser
Select all the text in the current window/tab
Copy that to the clipboard
Paste the text into a plain text document
Save it to a file

The reason I need plain text is so that command-line programs like grep can read and parse it.
 
wrldwzrd89 said:
Does anyone know how to do the following in AppleScript:

Open a web browser
Select all the text in the current window/tab
Copy that to the clipboard
Paste the text into a plain text document
Save it to a file

The reason I need plain text is so that command-line programs like grep can read and parse it.

there is an pre-configured automator action for Safari called "Get Text from Webpage" there are several others. You might play with that for awhile.
 
superbovine said:
there is an pre-configured automator action for Safari called "Get Text from Webpage" there are several others. You might play with that for awhile.
Thanks, somehow when I was looking through Automator I missed that completely.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.