Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
IE Control
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Database:
MySQL
Application:
Desktop
Divers
Thread ID:
01414167
Message ID:
01414208
Vues:
52
>>>>I do not know how to get direct link. One can go to www.foxite.com, and use their (confusing) search by ID: In the Thread Filter (NOT in Search!) choose ID 235281 and hit "Filter" button.
>>>
>>>Sorry, Yuri - I don't see Thread filter at this site at the top menu. I only see search and putting this number there (search by thread ID), doesn't result in that thread.
>>
>>Thread Filter is a small frame at the left part of the main screen there (see attached)
>
>You have to be a member of this site to use it.

Ok, here is my answer there:

*---------------------------------------------------------------------------------------------------

Then the answer is that you cannot do it with the object reference that you created initially and that points to the first window. And I do not know the mechanism to get another object reference to the second window.
As far as I know, only what you can do is to send keys to the second window, like:
oShell = CreateObject("WScript.Shell")
lnstart=second()
do while not oShell.AppActivate(EXACT WINDOW CAPTION) and ;
							second()-lnstart <=5
	wait wind time 1.0 "Entering Network Password...."
	if oShell.AppActivate(EXACT WINDOW CAPTION)
		oShell.SendKeys(EXACT KEYS AS IF USER ENTERS ID AND PASSWORD)		....
Search this forum for examples


Here is an addition to the above.
For your particular situation you can get the object reference to each window, like following (and I am omitting here details):
oCollection = CreateObject("Shell.Application")
lnwindows=oCollection.Windows.Count

*?oCollection.Windows.Count

	oIE = CreateObject("InternetExplorer.Application")
	oIE.Visible = .T.
	READYSTATE_COMPLETE=4
	oIE.Navigate("http://aggressive.live.ptsapp.com/logIn.cfm")
	do while oIE.Readystate <> READYSTATE_COMPLETE OR oie.busy OR oCollection.Windows.Count#lnwindows+2
*		?oCollection.Windows.Count
		WAIT WINDOW TIMEOUT 2.0 ""
	enddo

WITH oCollection.Windows(oCollection.Windows.Count-1)
	DO WHILE .busy
		WAIT WINDOW TIMEOUT 2.0 ""
	ENDDO
		.Document.getElementsByName("username").Item(0).value="username"
		.Document.getElementsByName("password").Item(0).value="password"
*		.Document.getElementsByName("button1").Item(0).click
ENDWITH

oie=null
RELEASE oie
oCollection=.null.
RELEASE oCollection
*---------------------------------------------------------------------------------------------------END
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform