Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Automate IE Popup
Message
 
À
12/10/2005 16:30:19
Joel Leach
Memorial Business Systems, Inc.
Tennessie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 7
Database:
Visual FoxPro
Divers
Thread ID:
01058408
Message ID:
01058628
Vues:
22
Then you need to loop through all open IE windows to get the reference to Login :
oCollection = CreateObject( "Shell.Application" )

FOR ia=0 to oCollection.Windows.Count-1
  WITH oCollection.Windows(ia)
   iF "iexplore.exe"$LOWER(.FullNAme)
      *all properties and Methods of InternetExplorer.Application may go here
        ?"Title: ",  	.locationName		&&Window Title
	?"URL: ",		.LocationUrl		&&URL
	?"Type: ", 		.Type
         if .locationName="Login"
            ?"here it is!"
            *work with the oCollection.Windows(ia).Document content, frames as needed
            EXIT
         endif
    endif
  ENDwith
ENDFOR

oCollection=.null.
RELEASE oCollection
>This works, except that Norton complains about the script, which makes the process less automated. I'd rather stick with IE automation if possible.
>
>>Try this:
>>
>>
>>oShell = CreateObject("WScript.Shell")
>>IF oShell.AppActivate("Login")
>>    ?"OK"
>>    oShell.SendKeys("hello{TAB}password{ENTER}")
>>endif
>>
>>
>>>I'm trying to use IE automation to login and transmit data to a web site (a Web Service is currently not available). My problem is that the initial page opens a popup window for logging in, but I can't get a reference to the popup. It doesn't show up in the IE.Document.Forms collection. Does anyone know how to do this? Once I have the reference, I think I can proceed. Here's what my code looks like:
>>>
>>>oIE = CreateObject("InternetExplorer.Application")
>>>oIE.Visible = .t.
>>>oIE.Navigate("https://goldleafach.com/achbeta/?8435017")
>>>? oIE.Document.Forms.Length  && returns 1 (initial form only)
>>>? oIE.Document.Forms(0).Name && returns name of initial form
>>>? oIE.Document.Forms(1).Name && fails
>>>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform