For macOS, I just use the AppleEvent as I described, for which Xojo provides a handy event.
For Win/Lin there are two issues:
how does one send a message to a running desktop app? What event does one use inside the application to detect that the message is available?
for each of those two platforms, what would be the internal format of the message so I can decode to decide what to do.
Specifically, I’m trying to figure out how to get my app to respond to mailto events generated by, f’rinstance, a web browser when a user clicks on a mailto: link.
Yes, I found that some time ago. But it does not then list my app as one which can be selected as the default app for mailto. So, having found that, I am no further forward.
Yes. In a Win-11 system I was using earlier today, if I navigate there it lists OUTLOOK.EXE. Thanks, that looks more promising as while the first one appears to relate to the default, the others may be Thunderbird regsitering itself.
Thank you both for the pointers. The one thing missing from the Windows one, but not the macOS one, is that the Windows blog talks about a way to start the app which will react to the URI, but says nothing about how to manage when the app is already running and is in the foreground, being used.
Under macOS you get an event, or the app is started and then you get the event; on Windows the assumption seems to be that the app is not running, but that the app is started, and it should then look at system.CommandLine to see what, if anything, it has been sent.
So there is this fundamental difference, it seems, between macOS and Windows.
The trick to managing the Windows behavior is to use a mutex and an IPCSocket to tell your already running process what to do. I learned that from one of the old Xojo team who mentioned this was how the Feedback app worked.
As I hinted in my OP, I was afriad that this might be the case. But in any case it won’t be me telling my app what to do. It’ll be FireFox or Edge or Chrome - that is where the clickable mailto will be lurking. So what do they do, I wonder.