Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

DDE support broken

  • 8 replies
  • 1 has this problem
  • 26 views
  • Last reply by k_zeon

more options

I made a program in VB6 and used DDE to get the current Browser URL. This now seems to be broken. I know VB6 is very old , but so am I.

Is there another technique that would allow an external app to get the current browser url

I made a program in VB6 and used DDE to get the current Browser URL. This now seems to be broken. I know VB6 is very old , but so am I. Is there another technique that would allow an external app to get the current browser url

All Replies (8)

more options

Which browser URL are you trying to get?

more options

just the one that is currently open. ie the tab that has focus

in VB6 i used

 TxtDDE.LinkTopic = "firefox|WWW_GetWindowInfo"
   TxtDDE.LinkItem = &HFFFFFFFF
   TxtDDE.LinkMode = 2
   TxtDDE.LinkRequest

but no longer works on version 57

Modified by k_zeon

more options

I thought DDE support ended a long time ago, but perhaps some aspects were still working?

You may need to look at Windows API calls. This can be a bit involved since you may need to cycle through open windows if you have multiple Firefox windows. If you only have one window, maybe:

http://www.vbforums.com/showthread.php?316924-Find-Window-handle-by-Partial-Caption

Note that you do not necessarily care about the Window handle (hWnd), you may only care about the full results of GetWindowText().

Anyway, that part of my memory is very dusty now and there must be far better forums for refining your code than this one.

more options

Hi jscher2000 thanks for replying. I dont think Firefox exposes the url textbox for some time. I know how to get the handle to firefox, but cannot get any children handles to contained controls. Thats why i used DDE to get the url. Now not sure what to do, except copy the url and paste to my app.

Unless anyone knows any API to get Firefox URL textbox

tks

Modified by k_zeon

more options

Sorry, I was thinking of the window title, not the URL. Perhaps an add-on could do it (an extension that communicates with a native application). Most such extensions -- designed to open a URL in a different browser -- are still a bit rough around the edges, and they demand a certain level of trust for the intermediary application.

more options

thanks anyway. never made a firefox addon before. dont even know where to start or how to make my app interact with it

more options

When click the 3 Button Menu in the Address Bar when on the page you want there is 3 options with what to do with the link. Maybe helpful or not. Since is on the Windows Clipboard access the clipboard with another script or.....

See if there is a extension all ready made : https://addons.mozilla.org/en-US/firefox/extensions/

Please let us know if this solved your issue or if need further assistance.

more options

Hi Pkshadow I have already converted my app to paste from clipboard, and will have to copy link 1st. I did not want to do this, as now i have to right click url and copy then goto my app and paste. I used to just go to my app and press button to capture the url. I dont think there is anything made already to do this. Every VB6 example i found used the DDE method, but now sadly its broken in 57.I just wished Firefox could open read only api for external apps. even if command line or some built in API.

So i do not have a solution at present except to use clipboard.

many thanks. Will hope someone more experienced with VB & Firefox can find a solution.

Modified by k_zeon