Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Gathering Info from Web Pages
Message
From
17/11/2010 05:24:02
 
 
To
17/11/2010 05:05:21
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01489134
Message ID:
01489340
Views:
57
Can you provide the URL in question? You may use my private email address.

>Thanks Tore it's really interesting.
>I tell you what I need to do.
>I have to get the email address of people who belongs to a certain data bank, I can see their email one at time by clicking on a name from a list provided by an Asp call. So I should to automize the list creation and the click over each of the names provided.
>Do you think it is possible ?
>
>>I do a lot of IE automation myself, and I have found IE WebDeveloper to be a fantastic help. http://www.ieinspector.com/dominspector/
>>
>>With IE WebDeveloper active, you can find the complete "path" to any element by clicking on them. For instance you will get this "path" to the "Subscribe" button on the URL I showed you: document.forms.item(0).childNodes.item(4).childNodes.item(3). To the "Your Email Here" textbox, you get document.forms.item(0).email. With this info I can make this little program, which I promise you actually works:
>>lcURL='http://www.ieinspector.com/dominspector/'
>>lcEmail='myemail@mysite.it'
>>lnTime=1200 && 12 seconds
>>Public lox
>>lox=Createobject('internetexplorer.application')
>>lox.visible=.T.
>>lox.Navigate(lcURL)
>>If !NavComplete(lox,lnTime)
>>   ??Chr(7)
>>   Wait 'Timeout feil!' Window
>>   lox.Visible=.F.
>>   Release lox
>>   Return
>>Endif
>>lox.document.forms.item(0).email.innertext=lcEmail
>>*lox.document.forms.item(0).childNodes.item(4).childNodes.item(3).click() && Commented out for obvious reasons....
>>
>>   
>>Function NavComplete
>>   Lpara toIE, tnTimeout
>>   lnTimeout=Iif( Type("tnTimeout")="N",tnTimeout ,60 )
>>   lnTimeElapsed=0
>>   lnStartSeconds=Seconds()
>>   Do While .T.
>>      If toIE.ReadyState=4 And !toIE.Busy
>>         Do While .T.
>>            If toIE.Document.ReadyState="complete"
>>               Return .T.
>>            Endif
>>            If (Seconds()-lnStartSeconds)>lnTimeout
>>               Return .F.
>>            Endif
>>         Enddo
>>      Endif
>>      If (Seconds()-lnStartSeconds)>lnTimeout
>>         Return .F.
>>      Endif
>>   Enddo
>>Endfunc
>>
>>>Really interesting Tore thanks, I don't know if it will solve my problem but it's great anyway.
>>>
>>>
>>>>Check out http://www.west-wind.com/presentations/shellapi/shellapi.asp
>>>>
>>>>>Hi there,
>>>>>I Have the need of gathering info from a web page.
>>>>>I remember it was possible to gather the Html code from the web but I'd would be glad if someone recalled me how :)
>>>>>What I don't really know how to do is programmatically clicking on a link and to get the html code of the opened page.
>>>>>
>>>>>Thanks
>>>>>Alessio
Previous
Reply
Map
View

Click here to load this message in the networking platform