B
BrandonBrandonBrandon
Guest
I am using game maker to create a utility that will read a file that exists in the same directory as the utility's executable.
How can I get that directory?
for example:
More detailed information:
I am open to all ideas on how to accomplish this task.
How can I get that directory?
for example:
If my executable is
/home/brandon/desktop/dialog/runner
or
C:\dialog\runner.exe
I want to get the following directoryor
C:\dialog\runner.exe
/home/brandon/desktop/dialog/
or
C:\dialog\
or
C:\dialog\
More detailed information:
The utility I am making has two parts, the editor, and the runner. The editor is a java application that creates dialog files, and the runner is a game maker application that reads these dialog files for testing purposes for a game I am creating. From the editor (java application) I want to save a dialog file, execute the runner (game maker application), and pass the runner the location of that dialog file. The runner will then proceed to read the file and display its contents using my dialog system. My initial thought was to just pass the runner a command line argument on startup that pointed to the dialog file location, but I can see no way of reading command line arguments from gamemaker. My next thought was to have an ini file in the runner executable directory that would contain the location of a dialog file. The runner would then just read that ini file, get the dialog file location, and then read the dialog file.
I am open to all ideas on how to accomplish this task.