Hello,
I have an experiment design similar to the P300-magic-card design.I hope that when the first scenario(step-1) is over,the scond scenario(step-2) will start automatically.,then step-3,step-4.In a word,is there a box to connect two separate scenarios and lets them be actuated in an order?
Best,
Shelldream
Start playing a senario by a toolbox
-
- Posts: 775
- Joined: Tue Dec 04, 2012 3:53 pm
- Location: INRIA Rennes, FRANCE
Re: Start playing a senario by a toolbox
Hi Shelldream,
having that kind of scriptable scenarios is on our wishlist. Meanwhile, you can try to hack it as follows,
1) Locate an example of a scenario where playback stops by itself, e.g. test/SinusOscillator.xml (in the SVN) uses a box called Player Controller to stop playback after a while. Some SSVEP tutorial scenarios also have similar functionality.
2) Make all your scenarios stop themselves when they end
2) Then you can queue the scenarios from the command line as follows,
$ openvibe-designer --play --no-gui scenario1.xml
$ openvibe-designer --play --no-gui scenario2.xml
$ ...
Good luck,
Jussi
having that kind of scriptable scenarios is on our wishlist. Meanwhile, you can try to hack it as follows,
1) Locate an example of a scenario where playback stops by itself, e.g. test/SinusOscillator.xml (in the SVN) uses a box called Player Controller to stop playback after a while. Some SSVEP tutorial scenarios also have similar functionality.
2) Make all your scenarios stop themselves when they end
2) Then you can queue the scenarios from the command line as follows,
$ openvibe-designer --play --no-gui scenario1.xml
$ openvibe-designer --play --no-gui scenario2.xml
$ ...
Good luck,
Jussi
-
- Posts: 35
- Joined: Thu Sep 20, 2012 9:40 am
Re: Start playing a senario by a toolbox
[quote="jtlindgren"]
2) Make all your scenarios stop themselves when they end
2) Then you can queue the scenarios from the command line as follows,
$ openvibe-designer --play --no-gui scenario1.xml
$ openvibe-designer --play --no-gui scenario2.xml
$ ...
Hello,jtlindgren
Thank you for your help. But I am a little confused with the "queue the scenarios from command lines" you said.Where should I add these sentances? In ov-designer.cmd? The following is what in my .cmd file. I don't understand how to modify it.
@echo off
pushd ..\scripts
call win32-init_env_command.cmd
popd
cd bin
OpenViBE-designer-dynamic.exe %1 %2 %3 %4 %5 %6
pause
Hoping for your suggestions!!
Shelldream
2) Make all your scenarios stop themselves when they end
2) Then you can queue the scenarios from the command line as follows,
$ openvibe-designer --play --no-gui scenario1.xml
$ openvibe-designer --play --no-gui scenario2.xml
$ ...
Hello,jtlindgren
Thank you for your help. But I am a little confused with the "queue the scenarios from command lines" you said.Where should I add these sentances? In ov-designer.cmd? The following is what in my .cmd file. I don't understand how to modify it.
@echo off
pushd ..\scripts
call win32-init_env_command.cmd
popd
cd bin
OpenViBE-designer-dynamic.exe %1 %2 %3 %4 %5 %6
pause
Hoping for your suggestions!!
Shelldream
-
- Posts: 775
- Joined: Tue Dec 04, 2012 3:53 pm
- Location: INRIA Rennes, FRANCE
Re: Start playing a senario by a toolbox
Its called 'shell scripting', basically on Windows you open the command prompt (write 'cmd' to start menu search box) and write the stuff there while being in a directory with the openvibe-designer.cmd script. After you know the sequence of commands you want, you use a text editor to write them down as another .cmd file. Then you can run this script.
Shell scripting is a very old subject dating to a time before graphical user interfaces. There's a lot of information available on the web.
Edit: Other option is to take a copy of the launch script you copy-pasted above and replace the lines with openvibe-designer.exe %1 %2 ... with calls like I described above, except using .exe. Note that you must provide path to each scenario so that it can be found.
Cheers,
Jussi
Shell scripting is a very old subject dating to a time before graphical user interfaces. There's a lot of information available on the web.
Edit: Other option is to take a copy of the launch script you copy-pasted above and replace the lines with openvibe-designer.exe %1 %2 ... with calls like I described above, except using .exe. Note that you must provide path to each scenario so that it can be found.
Cheers,
Jussi
-
- Posts: 35
- Joined: Thu Sep 20, 2012 9:40 am
Re: Start playing a senario by a toolbox
Hi,
Wow,it's great! I can run my scenarios in an order automatically without opening the openvibe-designer interface! Appreciate your kindness!! While, I find that "--no-gui" must be put before '--play filename' when writing lines in the .cmd file. My line is "OpenViBE-designer-dynamic --no-gui --play D:/OV/DesignerCMD.xml".Hoping this can help others.
Best,
Shelldream
Wow,it's great! I can run my scenarios in an order automatically without opening the openvibe-designer interface! Appreciate your kindness!! While, I find that "--no-gui" must be put before '--play filename' when writing lines in the .cmd file. My line is "OpenViBE-designer-dynamic --no-gui --play D:/OV/DesignerCMD.xml".Hoping this can help others.
Best,
Shelldream
-
- Posts: 35
- Joined: Thu Sep 20, 2012 9:40 am
Re: Start playing a senario by a toolbox
Hi,
Today I tried to modify my openvibe-designer.cmd file under windows7 system. While,I found the codes were totally different from the codes in another computer under windowsXP.
I replaces the
"%OV_RUN_IN_BG% "%OV_PATH_ROOT%\bin\openvibe-designer.exe" %1 %2 %3 %4 %5 %6"
with
"%OV_RUN_IN_BG% "%OV_PATH_ROOT%\bin\openvibe-designer D:/exercise/1.xml",
"%OV_RUN_IN_BG% "%OV_PATH_ROOT%\bin\openvibe-designer D:/exercise/2.xml".
But when 1.xml is finished ,the openvibe designer is over,it doesn't run 2.xml. Where is the fault?
The following are my codes in openvibe-designer.cmd file.
@ECHO OFF
SETLOCAL EnableExtensions
REM Get the directory location of this script, assume it contains the OpenViBE dist tree. These variables will be used by OpenViBE executables.
SET "OV_PATH_ROOT=%~dp0"
SET "OV_PATH_BIN=%OV_PATH_ROOT%\bin"
SET "OV_PATH_LIB=%OV_PATH_ROOT%\bin"
SET "OV_PATH_DATA=%OV_PATH_ROOT%\share"
SET OV_PAUSE=PAUSE
SET OV_RUN_IN_BG=
IF /i "%1"=="--no-pause" (
SET OV_PAUSE=
SHIFT
)
IF /i "%1"=="--run-bg" (
REM Run in background, disable pause. The first start arg is the app title.
SET OV_RUN_IN_BG=START "openvibe-designer.exe"
SET OV_PAUSE=
SHIFT
)
SET "OV_ENVIRONMENT_FILE=%OV_PATH_ROOT%\bin\OpenViBE-set-env.cmd"
IF NOT EXIST "%OV_ENVIRONMENT_FILE%" (
ECHO Error: "%OV_ENVIRONMENT_FILE%" was not found
GOTO EndOfScript
)
CALL "%OV_ENVIRONMENT_FILE%"
%OV_RUN_IN_BG% "%OV_PATH_ROOT%\bin\openvibe-designer.exe" %1 %2 %3 %4 %5 %6
:EndOfScript
I hope someone can give me a hand .
Thank you!!
Shelldream
Today I tried to modify my openvibe-designer.cmd file under windows7 system. While,I found the codes were totally different from the codes in another computer under windowsXP.
I replaces the
"%OV_RUN_IN_BG% "%OV_PATH_ROOT%\bin\openvibe-designer.exe" %1 %2 %3 %4 %5 %6"
with
"%OV_RUN_IN_BG% "%OV_PATH_ROOT%\bin\openvibe-designer D:/exercise/1.xml",
"%OV_RUN_IN_BG% "%OV_PATH_ROOT%\bin\openvibe-designer D:/exercise/2.xml".
But when 1.xml is finished ,the openvibe designer is over,it doesn't run 2.xml. Where is the fault?
The following are my codes in openvibe-designer.cmd file.
@ECHO OFF
SETLOCAL EnableExtensions
REM Get the directory location of this script, assume it contains the OpenViBE dist tree. These variables will be used by OpenViBE executables.
SET "OV_PATH_ROOT=%~dp0"
SET "OV_PATH_BIN=%OV_PATH_ROOT%\bin"
SET "OV_PATH_LIB=%OV_PATH_ROOT%\bin"
SET "OV_PATH_DATA=%OV_PATH_ROOT%\share"
SET OV_PAUSE=PAUSE
SET OV_RUN_IN_BG=
IF /i "%1"=="--no-pause" (
SET OV_PAUSE=
SHIFT
)
IF /i "%1"=="--run-bg" (
REM Run in background, disable pause. The first start arg is the app title.
SET OV_RUN_IN_BG=START "openvibe-designer.exe"
SET OV_PAUSE=
SHIFT
)
SET "OV_ENVIRONMENT_FILE=%OV_PATH_ROOT%\bin\OpenViBE-set-env.cmd"
IF NOT EXIST "%OV_ENVIRONMENT_FILE%" (
ECHO Error: "%OV_ENVIRONMENT_FILE%" was not found
GOTO EndOfScript
)
CALL "%OV_ENVIRONMENT_FILE%"
%OV_RUN_IN_BG% "%OV_PATH_ROOT%\bin\openvibe-designer.exe" %1 %2 %3 %4 %5 %6
:EndOfScript
I hope someone can give me a hand .
Thank you!!
Shelldream
-
- Posts: 775
- Joined: Tue Dec 04, 2012 3:53 pm
- Location: INRIA Rennes, FRANCE
Re: Start playing a senario by a toolbox
You should specify designer the --play --no-gui parameters that I mentioned earlier.
Happy hacking,
Jussi
Happy hacking,
Jussi