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

wrldwzrd89

macrumors G5
Original poster
Jun 6, 2003
12,110
77
Solon, OH
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.
 

superbovine

macrumors 68030
Nov 7, 2003
2,872
0
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.
 

wrldwzrd89

macrumors G5
Original poster
Jun 6, 2003
12,110
77
Solon, OH
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.