Rev app to get HTML source from IE

RGould8 at aol.com RGould8 at aol.com
Wed Dec 11 15:03:00 EST 2002


In a message dated 12/11/02 2:32:02 PM, RGould8 writes:


> I'm trying to write a Revolution app that will get the HTML source from 
> whatever page is presently displayed in IE.  I need to have Revolution 
> detect when the user has reached a certain page on a web-site, and react to 
> that page after the user lands on it)  Normally, this would not be a 
> problem - - - I'd just have Revolution run an Applescript that says
> 
> tell application "Internet Explorer"
> set htmlsource to GetSource
> end tell
> 
> However, Applescript has a hard time with older versions of the Mac OS 
> (8.1, 8.5, 8.6), where it displays that annoying "where is" dialog.  Since 
> I'm running Rev in OS 8.1, 8.5, 8.6, I also cannot use the "using terms 
> from" command to allow Revolution to compile the GetSource call.  GetSource 
> in IE is apparently <<event MSIEORC>> as a raw code call.  I'm getting a 
> "compiler error" in Revolution when I try to run this script.  Since this 
> is my first attempt at using raw codes, I could be just getting the syntax 
> wrong.  Here's what I've got so far:
> 
> set creaType to "MSIE"
> tell application "Finder" to open application file id creaType
> 
> tell application "Finder" to set appOfMine to (the first process whose 
> creator type is (creaType as type class)) as <<class psn >>
> 
> tell application appOfMine
>      set theSource to <<event MSIEORC>>
>      return theSource
> end tell
> 
Whoops - - - realized I mistyped - - - that should say <<event MSIESORC>>, 
which fixes the problem with that raw code - - - - althought I still have an 
error with line 3.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.runrev.com/pipermail/use-livecode/attachments/20021211/b24c8965/attachment.html>


More information about the use-livecode mailing list