Prev Previous Post   Next Post Next
Old 13th February 2004, 17:12   #1
delmardale
Junior Member
 
Join Date: Feb 2004
Location: Alexandria, VA
Posts: 10
Send a message via AIM to delmardale
Question Need to get URL from all open Browser Windows

I am trying to configure a setup that will figured out where it was downloaded from, so it can then go out and download files based on your setup selections. This will be installed at various servers around the world, so URL's can't be hardcoded. The webpage automatically downloads and launches the setup when you go to the page. So I plan to look at URL's of open browser windows to get the server. Anyway I've got the code so far using the System plugin to get the URL from an IE window. However I need a way to loop through all open IE windows. It appears there is a windows API function called EnumWindows which should then callback to the application function. However I can't figure out how to do this in NSIS. Below is code go get the URL from an IE window.

Could someone show me or point me to some examples of how to perform this callback. Or tell me another way I can get the window handles of open IE windows.

Once I tackle IE, then I'll work on Mozilla/Netscape.

FindWindow $hWndIE "IEFrame"
IntCmp $hWndIE 0 done
MessageBox MB_OK "found IE window"
FindWindow $hWndIEChild "WorkerW" "" $hWndIE
FindWindow $hWndIEChild "ReBarWindow32" "" $hWndIEChild
FindWindow $hWndIEChild "ComboBoxEx32" "" $hWndIEChild
System::Call 'user32::SendMessage(i,i,i,t) i($hWndIEChild, ${WM_GETTEXT},255,.r0)'
StrCpy $URLString "$0"
MessageBox MB_OK "$URLString"
delmardale is offline   Reply With Quote
 
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump