>>>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