#1
|
|||
|
|||
running scripts without the IDE showing
Is it possible to run a Vizard script from the command line
Vizard.exe -r myscript.py and not have the splashscreen and/or the Vizard IDE pop up (or perhaps come up as minimized?) |
#2
|
|||
|
|||
Yeah, this is possible with version 2.12 and higher. Try this:
winviz.exe 0 myscript.py winviz.exe is in the same directory as Vizard.exe. The first argument is a number, which you don't need to worry about, and the second argument is the path to the script, which should usually be the full path, not just the script name. |
#3
|
|||
|
|||
Hmmm....
I have downloaded v2.12 and tried out your suggestion without success... The first time, I typed "C:\Program Files\Vizard20\bin\winviz.exe" 0 simpleworld.py and the 2nd time I changed directories to Vizard's bin directory and typed: winviz.exe 0 N:\AndyL\PythonPractice\simpleworld.py and both times I got the following error. (That's a zero as the second arg) Vizard 2.12 Traceback (most recent call last): File "<string>", line 12 in ? IOError: [Errno 2] No such file or directory: '0' (zero) CameraGroup::_sync() : _syncBarrier not created cannot block |
#4
|
|||
|
|||
oops...my bad
I got it backwards, the first argument is the script and the second argument is the number, hope i didn't cause too much headache. |
#5
|
|||
|
|||
OK, swapping the arguments go it to launch ok, but I notice that the evaluation splash screen pops up even though I have a licensed copy of Vizard. Is there a way to fix this or make it go away?
Also, I had been passing some other arguments to my scripts via command line (see the thread 15 - "Passing arguments to Vizard"). Is this possible to do when calling winviz directly? Last edited by hotspur1; 10-29-2003 at 08:34 PM. |
#6
|
|||
|
|||
oops...another bad
I'll create a fix for that as soon as possible. You should be able to pass arguments to your script. Just add them after the 0 and you can access them as usual in your script by using viz.args. |
#7
|
|||
|
|||
Thanks Farshid - appreciate all your help.
Just one other matter - I got a copy of the Release notes which shows an example of starting from the command line, but it doesn't include the final '0' - I guess the Release Notes should get corrected.... I also noted that after I run winviz in this way in the Command Window (Win2k), I cannot use the close button anymore to close the window! I have to go to the Task Manager to end the process... Last edited by hotspur1; 10-30-2003 at 11:21 AM. |
#8
|
|||
|
|||
Thanks for pointing that out.
About the command window, you'll have to take that up with Andy. Either way, you should be able to type "exit" to close it. |
|
|