Drag and Drop from Firefox Address Bar

Thread Starter

MrAl

Joined Jun 17, 2014
11,496
Hello there,

I would like to create a custom interface that accepts drag and drop requests when the use drags the icon just to the left of the address bar on Firefox. That is the icon that usually appears as a Padlock and/or a little "i" with a circle around it.
This icon(s), when dragged onto the desktop for example, creates a shortcut to that website where the address bar holds the address to.
Once you drop it, you can click on the icon to go to that website again.

The problem is, it does not use the File Drop interface and it may not even use a Comm interface but i am not sure about tht last one.
Anyway, the idea would be to create a program that accepts the drop so i can deal with it in my own program.

For File Drops the program main window can register as a drop target, and for shortcuts on say the desktop the Comm interface can be used to accept the drop and then you can use it in your program. However, this doesnt seem to work with the Firefox address although you can drag that onto the desktop and create a shortcut, so the desktop does accept it.

Right now the only way i can do this is to first drag it onto the desktop creating a new shortcut, then drag that new shortcut onto the main window of my program and read that shortcut with comm. That of course is a silly way to have to deal with this though. If i could use comm directly that would be much better, or anything else that would work.

Any ideas or links would help a lot, thanks much.
 

KeithWalker

Joined Jul 10, 2017
3,098
I use "Control/C" and "Control/V". It will copy and paste the address bar anywhere I want. Why take the time and trouble to write a routine to do it?
Regards,
Keith
 

Thread Starter

MrAl

Joined Jun 17, 2014
11,496
I use "Control/C" and "Control/V". It will copy and paste the address bar anywhere I want. Why take the time and trouble to write a routine to do it?
Regards,
Keith
Well, because i want to do it that way. I realize there are a host of other ways to do it, but this is what i want to do.
From there i will probably process the shortcut further and direct it to an appropriate folder.

Since i asked though, i found out it may use something called XPCOM or some other API i havent used yet. This means it would be very good to find an example drop target application so i can quickly figure out how to write the code for my program.
 
Top