English Amiga Board


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 13 April 2021, 09:08   #1
Foebane
Banned
 
Join Date: Sep 2011
Location: Cardiff, UK
Age: 51
Posts: 2,871
How does WinUAE receive dragged archives?

I am writing a menu program for my Amiga archives so that I can select them, and then drag'n'drop, each, into WinUAE as it is running on the Taskbar.

What I would like to know is, what information should I be dragging over to WinUAE from my own program? My guess would be the full Windows path for the archive - am I right?
Foebane is offline  
Old 13 April 2021, 17:55   #2
Foebane
Banned
 
Join Date: Sep 2011
Location: Cardiff, UK
Age: 51
Posts: 2,871
I've given up on the menu program, as it turns out I already have software that can more or less do this, just less refined.

I don't know also if no-one understood my query, or if it was some kind of coding state secret, but it turns out coding for drag'n'drop operations is very easy one way, very difficult the other, according to Lazarus IDE/FPC, anyway.
Foebane is offline  
Old 13 April 2021, 18:44   #3
DamienD
Banned
 
DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 47
Posts: 20,420
Quote:
Originally Posted by Foebane View Post
I don't know also if no-one understood my query
This
DamienD is offline  
Old 13 April 2021, 19:04   #4
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
I don't understand the need for this question because drag and drop is Win32 API feature and you could check the sources. (It uses WM_DROPFILES message).
Toni Wilen is online now  
Old 13 April 2021, 19:49   #5
Foebane
Banned
 
Join Date: Sep 2011
Location: Cardiff, UK
Age: 51
Posts: 2,871
Quote:
Originally Posted by DamienD View Post
This
Quote:
Originally Posted by Toni Wilen View Post
I don't understand the need for this question because drag and drop is Win32 API feature and you could check the sources. (It uses WM_DROPFILES message).
It was difficult to describe my request, yes.

That helps a lot. I'll try experimenting with Free Pascal Compiler and the Lazarus IDE sometime later, as they weren't working properly neither earlier this morning (failed on me for the first time ever) - probably a 13th thing.
Foebane is offline  
Old 14 April 2021, 08:25   #6
Foebane
Banned
 
Join Date: Sep 2011
Location: Cardiff, UK
Age: 51
Posts: 2,871
At the moment, this is my Amiga Demos menu for WinUAE:

I select the demo from the PNG thumbnails on the left, find the @ number on the right and then drag the corresponding zip file into the WinUAE icon on the Taskbar right below.

I thought if I combined the two processes together in my own launcher, then it would be better, but as I said, the main problem I had was how FPC/Lazarus deals with such a drag'n'drop process.

I figure it's probably best to leave it to existing programs like IrfanView and WinRAR, to be honest.
Attached Thumbnails
Click image for larger version

Name:	menu.jpg
Views:	126
Size:	186.9 KB
ID:	71578  
Foebane is offline  
Old 14 April 2021, 13:54   #7
haps
Rumpig
 
haps's Avatar
 
Join Date: Aug 2006
Location: The bottom of the bottle
Age: 92
Posts: 243
haps is offline  
Old 14 April 2021, 18:21   #8
Foebane
Banned
 
Join Date: Sep 2011
Location: Cardiff, UK
Age: 51
Posts: 2,871
Quote:
Originally Posted by haps View Post
Be puzzled all you want, it's the best I can do until I solve this programming problem.
Foebane is offline  
Old 14 April 2021, 19:18   #9
DamienD
Banned
 
DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 47
Posts: 20,420
I've said it before Foebane, but you don't want to...

Just set a config per demo, and all good

You can tweak settings individually and then even take title / screenshots.

Yes it's a bit of work, but once done

IMHO much better than your current cryptic few configs and whatever other crazy stuff you are doing. It really seems that you like to complicate things
DamienD is offline  
Old 14 April 2021, 20:18   #10
Foebane
Banned
 
Join Date: Sep 2011
Location: Cardiff, UK
Age: 51
Posts: 2,871
Quote:
Originally Posted by DamienD View Post
I've said it before Foebane, but you don't want to...

Just set a config per demo, and all good

You can tweak settings individually and then even take title / screenshots.

Yes it's a bit of work, but once done

IMHO much better than your current cryptic few configs and whatever other crazy stuff you are doing. It really seems that you like to complicate things
Just because I've got almost infinite possibilities with emulation, doesn't mean I should act on them by "tweaking" for each individual demo so it's absolutely tip-top perfect.

Say you have a lot of demos, but a real A500 and a real A1200. You're limited to the two speeds of those two machines, as well as any other constraints they have. I choose to let my "cryptic" configurations act like real machines, with the limitations they may have.

I already have eight "virtual Amigas" as it is, the last thing I want is 500+ finely honed and tweaked configurations for each and every single one of them, including (in your case) finely shifted screen positions ( ). That way, in my case, it would be like having 500+ real Amigas in my bedsit, which of course is impossible by many degrees.

Emulation configurations for Amiga might give me the freedom I want, but I would like to be prepared if I ever get limited to a few REAL Amigas one day.

Now let that be an end of the debate.

EDIT: Even if my current way of doing things is clumsy, and it is fiddly, if I'm able to solve the problem I describe, I'd be able to program my own launcher without any extra configs at all.
Foebane is offline  
Old 15 April 2021, 08:16   #11
Foebane
Banned
 
Join Date: Sep 2011
Location: Cardiff, UK
Age: 51
Posts: 2,871
I forgot to mention, DamienD: my system is RELIANT on drag'n'drop, there is no alternative.

I couldn't find the code I needed to drag'n'drop into WinUAE from my menu program, but I've got a workaround, where my menu program will copy the selected demos to the desktop in ZIP form and then I drag them to WinUAE in the taskbar. It's the best I can do.
Foebane is offline  
Old 15 April 2021, 09:02   #12
haps
Rumpig
 
haps's Avatar
 
Join Date: Aug 2006
Location: The bottom of the bottle
Age: 92
Posts: 243
https://www.freepascal.org/~michael/...p/dragdrop.pdf
haps is offline  
Old 15 April 2021, 10:02   #13
Foebane
Banned
 
Join Date: Sep 2011
Location: Cardiff, UK
Age: 51
Posts: 2,871
Thanks for the link, Haps, but the article (like every other I've seen on the Internet) only mentions how a Lazarus application receives an item dragged TO it from somewhere else.

I'M after the method of how to drag an item FROM a Lazarus application to somewhere else, and it seems there's no simple method. The answer eludes me.
Foebane is offline  
Old 15 April 2021, 13:09   #14
haps
Rumpig
 
haps's Avatar
 
Join Date: Aug 2006
Location: The bottom of the bottle
Age: 92
Posts: 243
http://melander.dk/articles/dragdrop52released/
haps is offline  
Old 15 April 2021, 17:53   #15
Nightshft
Registered User
 
Nightshft's Avatar
 
Join Date: Mar 2018
Location: Austria
Posts: 615
Quote:
Originally Posted by Foebane View Post
Thanks for the link, Haps, but the article (like every other I've seen on the Internet) only mentions how a Lazarus application receives an item dragged TO it from somewhere else.

I'M after the method of how to drag an item FROM a Lazarus application to somewhere else, and it seems there's no simple method. The answer eludes me.
That's because Drag&Drop is something a program is meant to receive and not to send IMHO. I am no expert to windows messaging, maybe if you study there you find more information about such possibilities.

IMHO what happens if you drag&drop an .adf over the WinUae Icon while it's not running is that WinUae receives the path and filename of the .adf as a command line parameter. Toni implemented that the .adf gets mounted and the default config system boots from it (I never use this, it's from quickly looking what happens). I think you also can change the configuration used by applying the -f parameter. Btw. Toni, WinUae is just awesome, thanks for all your work!

I dont understand why you'r saying that only Drag&Drop is possible on your system.

However I see one good solution:

Use "open external application with parameters"
and how you do that in Delphi/Pascal is: shellExecute() which uses ShellApi.

It let's you run an external exe (like Winuae) with a parameter (like the .adf file). Send the whole path of the .adf file and you don't have to copy it to nowhere (maybe use quotation marks if needed).

Just google "delphi shellExecute" and you find plenty of information.

Your program then fires up WinUae with the demo as a parameter and that should work.

Hope that helps.
Nightshft is offline  
Old 15 April 2021, 20:17   #16
mrv2k
Registered User
 
Join Date: Apr 2020
Location: England
Age: 53
Posts: 431
Quote:
Originally Posted by Nightshft View Post
That's because Drag&Drop is something a program is meant to receive and not to send IMHO. I am no expert to windows messaging, maybe if you study there you find more information about such possibilities.

IMHO what happens if you drag&drop an .adf over the WinUae Icon while it's not running is that WinUae receives the path and filename of the .adf as a command line parameter. Toni implemented that the .adf gets mounted and the default config system boots from it (I never use this, it's from quickly looking what happens). I think you also can change the configuration used by applying the -f parameter. Btw. Toni, WinUae is just awesome, thanks for all your work!

I dont understand why you'r saying that only Drag&Drop is possible on your system.

However I see one good solution:

Use "open external application with parameters"
and how you do that in Delphi/Pascal is: shellExecute() which uses ShellApi.

It let's you run an external exe (like Winuae) with a parameter (like the .adf file). Send the whole path of the .adf file and you don't have to copy it to nowhere (maybe use quotation marks if needed).

Just google "delphi shellExecute" and you find plenty of information.

Your program then fires up WinUae with the demo as a parameter and that should work.

Hope that helps.
As NightShft said, it's much easier to run images from the command line. For instance, if you have a standard default config, you can customize it from the command line like this...

Code:
winuae64 -f test.uae -s use_gui=no -s nr_floppies=2 -s floppy0=9fingers1.adf -s floppy1type=1 -s floppy1=9fingers2.adf
I've written a frontend that does exactly this. As for drag and drop, you just have to drop a text line of the file path and WinUAE will do the rest.
mrv2k is offline  
Old 16 April 2021, 08:01   #17
Foebane
Banned
 
Join Date: Sep 2011
Location: Cardiff, UK
Age: 51
Posts: 2,871
Right, after a lot of research and working on a launcher, I've come up with ADLaunch (short for Amiga Demo), which is a nice front-end for my demo collection and the way it was laid out in post #6, but much easier to manage now.

So my eight configurations are listed on the far left, then the demos filtered to the selected config are listed in the next pane, and when clicked on, the thumbnails (or previews) of the demos are shown in the main part of the window. Then all that has to be done is to have WinUAE running on the taskbar, then click on the demo item in ADLaunch and drag it down to it, then drop it once WinUAE becomes fullscreen.

This has worked beautifully for me and it's my best program in ages! I will release the source code in The Zone! perhaps later today, if anyone's interested.
Attached Thumbnails
Click image for larger version

Name:	adlaunch.jpg
Views:	92
Size:	159.7 KB
ID:	71600  
Foebane is offline  
Old 16 April 2021, 14:49   #18
Foebane
Banned
 
Join Date: Sep 2011
Location: Cardiff, UK
Age: 51
Posts: 2,871
I've since added a filter which helps to make isolating certain demos easier.

Source code is in The Zone!

Thanks to Haps for the software I needed for the key part. Much appreciated!
Foebane is offline  
Old 17 April 2021, 07:47   #19
haps
Rumpig
 
haps's Avatar
 
Join Date: Aug 2006
Location: The bottom of the bottle
Age: 92
Posts: 243
Quote:
Originally Posted by Foebane View Post
Thanks to Haps for the software I needed for the key part. Much appreciated!

You're welcome, took ~30 seconds to find so was quite an effort.
haps is offline  
Old 17 April 2021, 08:05   #20
Foebane
Banned
 
Join Date: Sep 2011
Location: Cardiff, UK
Age: 51
Posts: 2,871
Quote:
Originally Posted by haps View Post
You're welcome, took ~30 seconds to find so was quite an effort.
Took me a while to figure out how to install the component in Lazarus, and then to find a demo that I could adapt for my own use. Wonder why they make it so difficult?

I will also make use of Nightshift's "ShellExecute" idea as well, maybe include a button that can launch WinUAE from within ADLaunch, by configuration, which would be especially cool!
Foebane is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Are drag'n'drop archives into WinUAE accessed via RDH0:? Foebane support.WinUAE 6 21 June 2019 13:13
Any known issues with dragging and dropping archives into WinUAE? Foebane support.WinUAE 8 04 April 2019 11:10
Where to find the .zip archives of older versions of WinUAE? mingle support.WinUAE 4 01 July 2014 20:55
lzh archives and winuae? kruwi support.WinUAE 1 21 April 2006 13:52
transdisk error after receive from pc Schattenmeister support.Hardware 1 09 October 2003 22:18

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


All times are GMT +2. The time now is 20:18.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.10606 seconds with 16 queries