None of the solutions (gratefully received!) offered so far work, I’m afraid, for the following reasons:
Kaydell: no, you can’t solve this kind of problem with Automator’s ‘Get current web page from Safari’. All that does is fetch the URL. I need the text displayed independent of loading the page. That’s the whole reason for the script. The server will go down (offline) at a known point in the near future. The users want to be able to capture the content of the page after receiving the service suspension notice in order to archive their own personal content on the site.
Paul: CURL only fetches the source code, but the point is the text is not delivered in the source html. If the page cannot “phone home”, the page just displays the source code, not the displayed text.
Santa: Yeah, you’re closest, but the modifications you provided don’t seem to have solved the ‘bugginess’ of my original attempt. The problem (I think) is TextEdit. It just doesn’t like being told what to do by “System Events” and doesn’t respond consistently on each run. Sometimes it works, sometimes it doesn’t, sometimes it goes into a dizzy spin...not acceptable to the audience I’m trying to serve.
BTW, I should have pointed out this is a password-protected website, so I can’t provide you a link to test on, but basically if the page needs to phone home and your code relies on that, it won’t work in the situation I’m dealing with.
Any other thoughts? Anyone?
On 4 Jul 2013, at 18:39, Kaydell Leavitt < email@hidden> wrote: Hi Phil,
I found what I believe to be a pretty clean solution in Automator (I don't know if that will help you or not, but I wanted to show it to you anyways.)
|