Causing the program to quit

I have created a hidden folder on disk, which my app looks for when it is first launched. If it finds it, all is well. If not, then it brings up an error message and quits.

I haven’t tried it on Windows yet, but it works perfectly fine on the Mac, except that after a pause the System informs the user that “The program has unexpectedly Quit”. I use the Quit command in my app to make it quit, that’s all - just Quit.

Is there anything else I can use to achieve the same effect, but without the error message from the System being created.

The main reason for this strategy is to see if a person has an installed copy of the program. The folder is created by InnoSetup on Windows (which will be the platform the program is to run on). If someone were to just give the program to someone else, then that folder would not exist. I think I have named folder in an innocent manner, that would not be easy to guess.

Thanks

Set the default window to None. Show the window if you find the folder.

Once again Thanks, Tim. The subtleties of Xojo keep arising :slight_smile: