Hi Russ, Thanks for including me in your response. I wasn't aware of the Socket object, but I just tried your script and it works great! This opens up possibilities for some interesting applications. Thanks again.
Rick Quatro Carmen Publishing Inc. 585-366-4017 r...@frameexpert.com -----Original Message----- From: framers-boun...@lists.frameusers.com [mailto:framers-boun...@lists.frameusers.com] On Behalf Of r...@weststreetconsulting.com Sent: Wednesday, April 30, 2014 3:30 PM To: framers@lists.frameusers.com Subject: Re: URL Checker John and Scott (and Rick), I have a sample ExtendScript that uses the Socket object, called "NETWORK_-_Retrieve_text_over_network.jsx". It retrieves text from a webpage and sticks it into a document. It could be easily modified to just look for the 200 OK message. All in all, this would be a very short and generally simple script for an experienced developer. A great idea for a script, really. I should add it to the group. I could use it myself. http://www.weststreetconsulting.com/WSC_ExtendScriptSamples.htm Russ ------------------------------ Message: 16 Date: Wed, 30 Apr 2014 09:46:55 -0700 From: Scott Prentice <s...@leximation.com> To: john.x.pos...@us.hsbc.com, framers Subject: Re: URL Checker Message-ID: <536128ff.2060...@leximation.com> Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" You got me thinking about this. Here's some really basic ExtendScript code that will iterate over all markers and check the text of "message URL" Hypertext markers to see if they are valid files (on the local file system). This would need to be cleaned up a bit to make it useful, but definitely doable .. var doc = app.ActiveDoc; var marker = doc.FirstMarkerInDoc; while (marker.id) { if (marker.MarkerTypeId.Name == "Hypertext") { var markerText = marker.MarkerText; if (markerText.substr(0,11) == "message URL") { var target = markerText.substr(12); // tests for local files var file = File(target); if (file.exists) { Console("GOOD ["+target+"]"); } else { Console("BAD ["+target+"]"); } } } marker = marker.NextMarkerInDoc; } It turns out that you can test for remote (web-based) URLs using the Socket object. Cheers, ...scott _______________________________________________ You are currently subscribed to framers as r...@rickquatro.com. Send list messages to framers@lists.frameusers.com. To unsubscribe send a blank email to framers-unsubscr...@lists.frameusers.com or visit http://lists.frameusers.com/mailman/options/framers/rick%40rickquatro.com Send administrative questions to listad...@frameusers.com. Visit http://www.frameusers.com/ for more resources and info. _______________________________________________ You are currently subscribed to framers as arch...@mail-archive.com. Send list messages to framers@lists.frameusers.com. To unsubscribe send a blank email to framers-unsubscr...@lists.frameusers.com or visit http://lists.frameusers.com/mailman/options/framers/archive%40mail-archive.com Send administrative questions to listad...@frameusers.com. Visit http://www.frameusers.com/ for more resources and info.