Handle double click on a file associated with LCL Application in MacOS lazarus / 33-macOS - Mac OS X ---------------------------------------------------------------------- daniel_sap · 2025-04-15 07:05 Hi, I have desktop Windows application written in Lazarus FPC which checks if FileExists(ParamStr(1)) then           fileManager.Open(ParamStr(1)); else   showWelcomeScreen(); The idea here is - if the user double clicks on a file in File Explorer it opens it, when it opens the application it shows welcome screen This works fine on Windows but now I build for MacOS and it always shows welcome screen. What would be the proper approach for implementing when user double clicks on file in finder on MacOS ---------------------------------------------------------------------- Hansaplast · 2025-04-15 07:25 I haven't tested this, but this wiki page (link) has some suggestions that may help. See the "Adding your custom URL scheme" section. ---------------------------------------------------------------------- daniel_sap · 2025-04-16 19:14 Quote from: Hansaplast on April 15, 2025, 09:25:14 amI haven't tested this, but this wiki page (link) has some suggestions that may help. See the "Adding your custom URL scheme" section. Thank you Hansaplast I changed the code to work for file associations double click Instead of ...kInternetEventClass, kAEGetURL);  for files should be kCoreEventClass, kAEOpenDocuments); And receive the event with proper file name. What I don't know is how long should I wait for this event. I don't want to slow down the start of the application too much, just because some event could possibly be triggered. For me it will be better if I can check directly if there is file double clicked instead of waiting ---------------------------------------------------------------------- Hansaplast · 2025-04-17 07:39 I've never worked with this, so I have no idea. Just being curious; how fast is the filename appearing in your app? I'd kind-a expect it to be there pretty quick (not having tested this myself). Is there a reason why you should wait for it? Can't your application complete its startup without waiting? ---------------------------------------------------------------------- rich2014 · 2025-05-15 11:49 TApplication.opDropFiles() for your reference