[scilab-Users] two questions : batch mode parameters and creating a menu to execute again a script or exit
Loïc GIROD
loic.girod at esstin.uhp-nancy.fr
Sun Jul 3 09:14:06 CEST 2011
Dear all,
I succeeded to create a x_choose menu with two possibilities :
- quit scilab = it works well
- execute the script again = not working
With my very basic programming skills, I have tried to use a "goto - from" instruction (I've read on many forums that this seems to be a very bad thing...) but I get an error 34.
To put it in a nutshell, here is a sample of the script in this part :
___________
from test;
choix=x_choose([Draw a new curve';'Quit'],['Please choose an item'])
if choix==1 then GOTO test;
else quit
end
___________
Second question regarding this dialog box, I would like it to appear only in "second plane". Indeed, my script draws a curve and just after, the dialog box appears and I can't anymore interact with the graph. How can I do that ?
Many thanks for your help.
Best regards
Loïc
--
-----Message d'origine-----
De : Loïc GIROD [mailto:loic.girod at esstin.uhp-nancy.fr]
Envoyé : vendredi 1 juillet 2011 15:41
À : 'users at lists.scilab.org'
Objet : RE: [scilab-Users] two questions : batch mode parameters and creating a menu to execute again a script or exit
Dear Sylvestre,
Many thanks for the help for the first point, it's good.
But for the second... I have thought about a "goto" function but not sure it's a good idea... Sorry but I get lost
Loïc
--
-----Message d'origine-----
De : Sylvestre Ledru [mailto:sylvestre.ledru at scilab.org]
Envoyé : vendredi 1 juillet 2011 14:27
À : users at lists.scilab.org
Objet : Re: [scilab-Users] two questions : batch mode parameters and creating a menu to execute again a script or exit
Le vendredi 01 juillet 2011 à 14:21 +0200, Loïc GIROD a écrit :
> Hello all !
>
>
>
> I wrote a script that can read binary files to draw curves from it.
>
> I’ve copied the script in /bin directory of scilab on a windows
> computer and I have created a shortcut on the desktop with the
> following parameters found on Internet : "C:\Program Files
> \scilab-5.3.2\bin\Scilex.exe" -nw –f programme.sce. It alloy the user
> to run the script without loading the scilab graphic interface.
>
>
>
> Regarding this, I have two questions :
>
> 1) Do you know where I can find the signification of the
> parameters used –nw –f and if others exist ?
See:
http://help.scilab.org/docs/5.3.2/en_US/scilab.html
> 2) Using this method, the script only executes once. Indeed, at
> the end of the script, the user must kill the process to stop it, come
> back to the desktop and run again the script thanks to the shortcut.
> Is there a way to add a menu which ask the user if he would like to
> quit the script or to execute it again ?
You can manage that with some Scilab codes...
Sylvestre
More information about the users
mailing list