The way you wrote the post makes it kinda hard to understand what exactly is the problem. Title says you want the dialog to show if the file couldn't be found, which should be a simple case of calling the function in the portion that deals with the error.
"but it doesn't open it, any clues why its not opening": not opening what, the dialog? The function? The file?
Reading the code, I noticed this:
First, in the check_all
function, you should use ConfigFile instead of File, since you're looking for a .ini file. So, use something like if config.load(OMM + "/OMM.ini") != OK:
Do note that a File.WRITE saves the data in a human unreadable manner, so you can't manually edit it.
Second, note that you didn't put an else
on the check folder function's if. Not strictly necessary, but it makes the logic clearer
If your problem is that your check folder function is always returning false, in other words, never finding the file you're looking for, the first thing I would look into is whether the path variable has the proper string you're expecting. Put a print(path)
at the start of that check function and compare it to your docs or OMM_folder variables.