DarknessX
08-05-2007, 12:54 AM
System: WinXP
Language: Pascal
OOP: No
Compiler/IDE: FPC
Libraries/API: None.
Update:
Even though there are spaces in the path to my exe, it doesn't change anything, as I ran it from C:\ and it still didn't do it. (Yes, I moved the text file with it).
OK, well, after much experimenting, I found:
http://freepascal.org/docs-html/rtl/dos/exec.html
I knew about this before, but this means basically to call an external app, I do this:
SwapVectors; {Not sure why, but I do remember this being used before..}
Exec(path,com); {Path to file, then commands to be run on the file...}
SwapVectors;
However, when I run this code:
SwapVectors;
Exec('time.txt','');
SwapVectors;
readln;
It doesn't run the app, but it waits on the readln... I'm confused. What do I need to do?
Or, is there another, just as easy way to do this?
Language: Pascal
OOP: No
Compiler/IDE: FPC
Libraries/API: None.
Update:
Even though there are spaces in the path to my exe, it doesn't change anything, as I ran it from C:\ and it still didn't do it. (Yes, I moved the text file with it).
OK, well, after much experimenting, I found:
http://freepascal.org/docs-html/rtl/dos/exec.html
I knew about this before, but this means basically to call an external app, I do this:
SwapVectors; {Not sure why, but I do remember this being used before..}
Exec(path,com); {Path to file, then commands to be run on the file...}
SwapVectors;
However, when I run this code:
SwapVectors;
Exec('time.txt','');
SwapVectors;
readln;
It doesn't run the app, but it waits on the readln... I'm confused. What do I need to do?
Or, is there another, just as easy way to do this?