diff options
author | jofret | 2010-06-21 12:41:59 +0000 |
---|---|---|
committer | jofret | 2010-06-21 12:41:59 +0000 |
commit | 4bf7cdc85339310c4ea2e8280f8fa0344780edef (patch) | |
tree | 016164d103ba56e59e42f4d5d548c57525779e7d | |
parent | ee9374440a33f8432ad4efcc7b70bc1639fa50de (diff) | |
download | scilab2c-4bf7cdc85339310c4ea2e8280f8fa0344780edef.tar.gz scilab2c-4bf7cdc85339310c4ea2e8280f8fa0344780edef.tar.bz2 scilab2c-4bf7cdc85339310c4ea2e8280f8fa0344780edef.zip |
Skip user interactive choice when in batch mode
-rw-r--r-- | scilab2c/macros/scilab2c.sci | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/scilab2c/macros/scilab2c.sci b/scilab2c/macros/scilab2c.sci index b0265931..2900a625 100644 --- a/scilab2c/macros/scilab2c.sci +++ b/scilab2c/macros/scilab2c.sci @@ -12,15 +12,15 @@ function scilab2c(varargin) [lhs, rhs] = argn(); - + select rhs -// +// // scilab2c() // case 0 sci2c_gui(); return -// +// // scilab2c(UserScilabMainFile, CCodeOutputDir) // case 2 @@ -102,7 +102,7 @@ function scilab2c(varargin) RunMode = varargin(4); BuildTool = varargin(5); else -// +// // Calling scilab2c with more than understood values // error(msprintf(gettext("%s: Wrong number of input argument(s): %d expected.\n"),"scilab2c",2)); @@ -113,7 +113,12 @@ error(msprintf(gettext("%s: Wrong number of input argument(s): %d expected.\n"), runscicode(UserScilabMainFile, UserSciFilesPaths); // --- ASK USER FOR CONTINUATION. --- - userchoice = messagebox("Exection Succesfull. Start translation ?", "modal", "info", ["Yes" "No"]) + // Do not open confirmation box if we are not in STD mode. + if(getscilabmode() == "STD") + userchoice = messagebox("Exection Succesfull. Start translation ?", "modal", "info", ["Yes" "No"]) + else + userchoice = 1 + end if (userchoice == 1) // --- LAUNCH SCI2C --- runsci2c(UserScilabMainFile, UserSciFilesPaths, CCodeOutputDir, RunMode, BuildTool); |