Oxygen Basic
Programming => Problems & Solutions => Topic started by: Aurel on February 07, 2013, 10:40:46 AM
-
Charles...
Do you can explain me what is proper way to use file startpath in Oxygen Basic.
I mean something like this ,for example i try to use in Asciedit this:
ShellExecute(0,"open", "/gxo2.exe","-c" + fName,"" , 5)
and work for file which is in same folder where is gxo2.exe...
but compiler don't respond on file somewhere else ?
In OxyEdit work ...
What might be problem?
-
Hi Aurel,
Your source file is in the current directory, I assume.
I don't use ShellExecute but I think you need to make sure that the full pathname to gxo2 is specified, and also the full pathname to the source code.
To capture the pathname for gxo2 at IDE startup, I use GetCurrentDirectory:
static char buf[256]
...
GetCurrentDirectory 256, buf
o2dir=buf+"\"
Charles
-
Yes Charles...you right...
uff ...how i can forget GetCurrentDirectory() ::)
-
Yes it work Ok.
Next code is added in global scope...
string gxName="\gxo2.exe"
char cdPath[256]
GetCurrentDir (256,cdPath)
cdPath=cdPath + gxName
print cdPath
So ,when you put editor exe in oxygen basic main folder( root)..
File opened from anywhere on your computer can be compiled.