Re: saving displayed text on a web page as rtf
Re: saving displayed text on a web page as rtf
- Subject: Re: saving displayed text on a web page as rtf
- From: Deivy Petrescu <email@hidden>
- Date: Thu, 04 Jul 2013 23:21:51 -0400
On Jul 4, 2013, at 08:55 , 2551 <email@hidden> wrote:
> Yes, I didn’t explain the problem very well, did I?
>
> It’s not with the URL action. It’s the ‘Get text from’ action. I believe that just gets the text from the source code, just like this does in AppleScript
>
> tell application "Safari"
> get text of document 1
> end tell
>
> However, the text that that returns is the source code of the page. That’s not what I’m after because that is all JavaScript that is being run on load by links to other pages on the server. If the page isn’t connected to the server, the page returns empty. The fact that you tested it and it worked likely means you tested it on a page that wasn’t relying on JS links to insert the display text.
>
> Theory aside, and thanks for your efforts, but the result of the workflow you provided on the page I’m trying to capture is an empty TextEdit document. You can see why quite clearly from the results tab of the Automator action after the run:
>
> <Screen Shot 2013-07-04 at 19.47.09.png>
>
>
>>>
>>> Any other thoughts? Anyone?
>>>
>
>
If you want to get the text of the page you are seeing this is the script that does it:
tell application "Safari" to get text of tab 1 of window 1
This assumes there is tabs, the first one is the one you want and there might be more than one winds, but you want the first one.
This return the text of the page and not the source code.
Deivy Petrescu
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden