>Hi all,
>
>Are there any theories on how an application could communicate interactively, in an automated fashion, with active server pages (ASPs) on a website?
>
>Essentially, the application needs to pass query parameters to an ASP on some webserver, then "scrape" the query results page to retrieve the data. I don't know if this is even possible, but we have been asked to do it. Do we *need* to go through a browser to talk to the ASP?
>
>This kind of thing is new to me, and I'm wondering if anyone has experience along these lines.
>
>TIA,
Philip- There are several ways to do this. The easiest, IMHO is to automate IE. The client (program, browser, whatever) doesn't care if the server is using ASP, WWC, CGI or anything else, it only sees the results of the processing. Try this in your command window, or in a prg (substitute "yourusername" and "yourpassword" with your real username and password):
oIE = CREATEOBJECT("InternetExplorer.Application")
oIE.Navigate("
http://www.levelextreme.com")
wait for a few seconds after this line... (in a real program, you would poll for the results, but we don't have time for that now... ;-)
oForm = oIE.Document.Forms(0)
oForm.All("Key").Value = "yourusername"
oForm.All("Password").Value = "yourpassword"
oForm.Submit()
Wait again right here...
oFrame3 = oIE.Document.Frames(2)
FOR EACH oLink IN oFrame3.Document.Links
IF oLink.Target = "MESSAGE"
?oLink.InnerText
ENDIF
ENDFOR
The code above shows the text for every new message in your default forum on the UniversalThread. Get an idea about how this works? If you have MSDN, look at ieref.chm for details about how IE's object model.
Erik Moore
Clientelligence