I need to pass some arguments from the command line in dos to a .exe and was wondering how to do it.
I thought of another way around the problem (.bat file that changes the value of an .ini file) but I just wanna know if you can do it the other way.
cheers guys
aLaN
And that's what I'm showing the example code in my first post does just that..
Replace the name some.exe with your executable names and replace the arguments with your executables arguments if you need further help with this subject I suggest you see my program (which uses command line parameters in Flash) and or search this board...
Lol.. Pure_Morning.. YES that is the DOS Prompt. I don't understand why he said no, but it is. You want to replace "some.exe" with the path to "command.com" and then add your command line switches, seperated by chr(9). Chr(9) is actually a TAB, but it acts as a space when processed. I suggest you add the command line switch "/c" before all other switches. That will close the DOS prompt box that pops up after it runs the commands you tell it. Much better than having the user do it him/herself. Oh and one more thing - download this example of a Windows "Run" box I made.. which uses the DOS Command Line to open any file that has a program associated with it on the user's computer (and is automatically opened by the program it is associated with). Let me know if you have any problems
In Flash 5 we can also replace spaces with tabs in expert mode or just write
\t
instead of all spaces
And about calling native applications
It is always possible to say just
FS Command ("exec", "start\tC:\\somefolder\\name.mp3")
for 95-98
FS Command ("exec", "cmd\t/c\tC:\\somefolder\\name.mp3")
for NT-2000
[Edited by Ilya on 01-20-2001 at 09:37 PM]
Ilya..
That's the exact method I used in the Standalone on the link above. I used chr(9) though, because I wasn't aware of the \t switch. I'll use that Hey Ilya.. since you seem to be pretty good with Command Line Arguments, do you know of a way to paste Variables from Flash directly to another application window? Click here to see my FlashKit post asking for help and a picture of the program I want to use this with. If you could help it'd be great