I'm new to the forums, but not to kliking. Okay, I have a small, yet very annoying, problem. I am coding a frontend app with TGF Pro and using the File Object to call upon the said MS-DOS program the frontend is being built for. Now, I have gotten it to successfully run the program with user-typed parameters within Edit Box's. Here's the code for the File Object once the user enters the correct info and presses the "Encode!" button:
Button ENCODE clicked + SOURCEDIR has just been modified + TARGETDIR has just been modified -
Run application: "adxencd.exe" "(wait)" + Edittext$( "SOURCEDIR" ) + Edittext$( "FILENAME" ) + ".wav"
Now, this encodes a WAV file over to an ADX file using an MS-DOS program. My problem is that once the file is created, I want the file to be moved to a directory of the users choice. I placed this code right after the above code:
Now, I'm sure this will work, but the fact is that everytime I do that, it doesn't move the file because it's trying to move a file that hasn't been created yet. The "(wait)" command doesn't work or else I wouldn't be asking this question. How do I get the file to be moved only after teh file has been created? Please help me. Thank you!
I'm not very familiar with the File object, but from a quick look, you could use the "Name exists" event to check continually if a file exists (with possibly an additional flag to stop the event if you're not expecting the file to be there yet), and have the Move action performed when it does. That relies on the file being created and written to all in one action, though.
Doesn't do anything. The file is still in the App's path. Anyone else used Object File before and gotten good results?
Jesse~
EDIT:
I got it to work...somewhat.
I got the desired effect by asking the MS-DOS program to create the file in a different directory instead of trying to move it. Here is the code:
Name of application to run:
"adxencd.exe"
Enter "(hide,wait)" then command line:
Edittext$( "SOURCEDIR" ) + Edittext$( "FILENAME" ) + ".wav" + " " + Edittext$( "TARGETDIR" ) + Edittext$( "FILENAME" ) + ".adx"