corz Posted April 7, 2018 Posted April 7, 2018 We've been able to drag images out of web browsers since forever. Can I drag one into my GUI? Or rather, can I drag an image from my web browser onto my GUI and have my app *do* something with that image? My fingers bleed from searching. Any ideas much appreciated! ;o) Cor nothing is foolproof to the sufficiently talented fool..
corz Posted April 11, 2018 Author Posted April 11, 2018 The title says it all, really. Is it possible to drag an image from a web browser (say, Chrome) and have it *do* something in my app, aside from a the "Don't Bother" cursor? I could have sworn I had a GUI that accepted drags from browsers but I can't pin it down. My web searching is just as fruitless. Anyone have any clues? ;o) Cor nothing is foolproof to the sufficiently talented fool..
Moderators JLogan3o13 Posted April 11, 2018 Moderators Posted April 11, 2018 Why are you posting this again? Threads merged, please stick to one topic. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
corz Posted April 11, 2018 Author Posted April 11, 2018 lol! I forgot I'd already asked! Cheers for noticing. Feel free to delete either post, of course. I guess no answers means no one knows. Och well. ;o) Cor nothing is foolproof to the sufficiently talented fool..
Moderators JLogan3o13 Posted April 12, 2018 Moderators Posted April 12, 2018 14 hours ago, corz said: I guess no answers means no one knows. Och well. Or you're being impatient or haven't provided a detailed explanation as to what you're trying to accomplish... "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
corz Posted April 12, 2018 Author Posted April 12, 2018 No, it's definitely what I said. And no more explanation is possible. ;o) Cor nothing is foolproof to the sufficiently talented fool..
Gianni Posted April 14, 2018 Posted April 14, 2018 (edited) In short you should first register the WM_DROPFILES message in your gui with something like this: GUIRegisterMsg($WM_DROPFILES, "WM_DROPFILES") and then manage the dropped images within your WM_DROPFILES() function. For an example have a look to this script by @UEZ: https://www.autoitscript.com/forum/topic/190642-ascii-art-kaleidoscope/?do=findComment&comment=1368827 Following the example by UEZ I've also used it in this other my script: https://www.autoitscript.com/forum/topic/190921-tsp-art-generator In both above example scripts you can drag an images from a browser and drop it on the GUI where it is catched and used as needed. Edited April 14, 2018 by Chimp Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....
corz Posted April 14, 2018 Author Posted April 14, 2018 (edited) Chimp, thanks! Trouble is, I already use WM_DROPFILES messages. I was accessing the DLL directly rather than using the WinAPI UDF (I hadn't noticed those functions) so I tried switching over to the UDF versions (much leaner code, thanks!) but it made no difference. I then tried fiddling with the GUICreate style attributes (looking at your example GUIs), but again with no effect. I ran the Kaleidoscope program (nice!) but on my system, dragging images from a web browser into it window won't work. Just like with my own app I get the "NO ENTRY" icon and nothing happens. Is this all supposed to work? Could there be something up with my system, perhaps? A security setting or something? ;o) Cor Edited April 14, 2018 by corz nothing is foolproof to the sufficiently talented fool..
Gianni Posted April 15, 2018 Posted April 15, 2018 (edited) I just tried, and: if I drag from firefox to the GUI everything works fine, but if I drag from IE I get a "no entry" icon. Since I normally use firefox I did not notice this "nice" feature of IE. If you drag an image from a folder from your hard drive it should work too (can you confirm?) (I am not surprised by these oddities generated by IE ... often rather than simplify things with IE are further complicated ....) Edited April 15, 2018 by Chimp Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....
corz Posted April 15, 2018 Author Posted April 15, 2018 (edited) I'm using Chrome. I don't even have Firefox installed right now. Hadn't tried IE. Most peeps use Chrome nowadays so I'd like it to work there. ;o) Cor ps. I just tried it in Edge. It works! Uses the path to the cached image, though, rather than the URL. Edited April 15, 2018 by corz nothing is foolproof to the sufficiently talented fool..
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now