Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting a URL from the currently active browser
Message
De
08/11/1999 14:17:42
 
 
À
08/11/1999 11:22:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00288323
Message ID:
00288590
Vues:
15
>>>I believe I am asking this question under the right catagory. Hi all. Using automation or an API call, I would like to extract the URL from the currently open browser (probably IE5) - I have spent an entirely frustrating and fruitless afternoon searching through the so-called help provided in the MSDN library and have come to terms with the fact that I do not even know where to look.
>>>Can anyone point me in the right direction?
>>>Thanks
>>>Robin
>>
>>Normally, there is no way to get an object handle on an already running instance of IE.
>>
>
>Erik, I'm shocked - this, from a long-time advocate of Shell.Application like you? < g >

I had completely forgotten about the utility of those handy little collections. Your post made me go back and review some of the other cool stuff that you can do with this little bugger.

One of the cool things relates to another post made here the other day- I had forgotten that you can do this: Gil Velasquez was asking how to find the available shell verbs for an application (though he didn't know that's what he was asking for :-)).

You can do this with the Shell.Application object by looking at the verbs collection for a folder item.

oShell = CREATEOBJECT("Shell.Application")
oFolder = oShell.NameSpace("c:\")
oItems = oFolder.Items

FOR EACH oItem IN oItems
IF oItem.Name = "MySong.mp3"
oVerbs = oItem.Verbs
FOR EACH oVerb IN oVerbs
?oVerb.Name
ENDFOR
ENDIF
ENDFOR


Thanks for reminding me of the power of this extremely cool interface to Windows functions. I will now try and remember to look at the Shell object first when trying to figure out how to do something with Windows interface, or shell.
Erik Moore
Clientelligence
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform