Open URL upon app closing

oldteacher

Active member
Scripting is not my strong point by any means. Is it possible to call a URL (open website) when user closes the app? If possible, anyone have a working example?
 
I had a brain fart. Really pretty simple when you get the parameters correct:


Code:
procedure OnPubBeingClosed;
begin
  OpenFile("https://moreonlineprofit.com", "", "");
end;
 
That is exactly right, and thanks for posting the solution. OnPubBeingClosed is the correct event for this, and OpenFile with an https URL opens it in the user's default browser.

One note for anyone reusing it: OnPubBeingClosed runs while the app is shutting down, so keep the handler short. A single OpenFile call like yours is perfect.
 
Back
Top