How to detect if running code is being run from IDE or not
Posted: Mon Jan 30, 2012 7:45 pm
Hi,
Does anyone know how to detect if running code is being run from within the IDE or from an exe.
I need to load a prefs file, currently using to get the path of the app, however it works fine when run from an exe but I need to specify a different prefs file if running from the IDE. Something along the line of
can anyone help as I have tried looking for IDE in the search and also the help file but found nothing suitable and I am sure it must of been discussed on this forum in the past but the seach is bring me 1000's of results
Thank you
Does anyone know how to detect if running code is being run from within the IDE or from an exe.
I need to load a prefs file, currently using
Code: Select all
Global CurrentDirectory.s = GetPathPart(ProgramFilename())
Code: Select all
If RunWithinIDE
Global CurrentDirectory.s = GetCurrentDirectory()
ELSE
Global CurrentDirectory.s = GetPathPart(ProgramFilename())
EndIf
Thank you