GennadiyKorol
06-21-2007, 11:18 PM
Something really weird is happening with how system() MEL command is executing windows shell commands.
Help reference states that to load an application in a foreground, all you need to do is not to use start or shell (which doesn't seem to exist in my XP), like that:
system("C:/aw/Maya/bin/fcheck.exe " + $filename);
But this won't work, at all. No matter what application you supply, even the notepad won't launch.
Well, if that isn't really working, I turned to start command. This:
system("start C:/aw/Maya/bin/fcheck.exe " + $filename);
will work, but the problem with it is that it will pop up an ugly black shell screen, together with fcheck, notepad, or any other application.
So an intuitive thing would be to add the /B (omit shell window) flag to start command, right?
system("start /B C:/aw/Maya/bin/fcheck.exe " + $filename);
The problem is in that this code won't work, at all. Not even the simple version:
system("start /B notepad");
The same is true for any flags /MIN, /W etc.
Looks like system() MEL command is filtering the arguments for start command? Or it is just totally broken on Windows. Because it is working perfectly on Linux and OSX.:shrug:
I would be very glad to know if you had any experience with this, especially those in Maya dev team (would appreciate your input here Tim).
Thanks for any help,
Henry
Help reference states that to load an application in a foreground, all you need to do is not to use start or shell (which doesn't seem to exist in my XP), like that:
system("C:/aw/Maya/bin/fcheck.exe " + $filename);
But this won't work, at all. No matter what application you supply, even the notepad won't launch.
Well, if that isn't really working, I turned to start command. This:
system("start C:/aw/Maya/bin/fcheck.exe " + $filename);
will work, but the problem with it is that it will pop up an ugly black shell screen, together with fcheck, notepad, or any other application.
So an intuitive thing would be to add the /B (omit shell window) flag to start command, right?
system("start /B C:/aw/Maya/bin/fcheck.exe " + $filename);
The problem is in that this code won't work, at all. Not even the simple version:
system("start /B notepad");
The same is true for any flags /MIN, /W etc.
Looks like system() MEL command is filtering the arguments for start command? Or it is just totally broken on Windows. Because it is working perfectly on Linux and OSX.:shrug:
I would be very glad to know if you had any experience with this, especially those in Maya dev team (would appreciate your input here Tim).
Thanks for any help,
Henry
