[Scilab-users] Running an .sce from the command line.

aweeks at hidglobal.com aweeks at hidglobal.com
Fri Apr 1 10:36:41 CEST 2016


Hi,

I don't know if this will be any help to you in this particular case but 
it may be of some interest.

I was using Scilab to control some hardware and receive and display data 
coming back.  The data was displayed in a graphics window and I then had 
to enter some commands to the Scilab console.  The windows focus always 
ended up on the graphics window and I had to keep putting it back on the 
console using the mouse:  the novelty of doing this quickly wore off.

My PC at the time was running Windows XP and I had the following 
arrangement:

        In a folder, a file called   "focusonwindow.vbs"  containing these 
two lines:

        Set WshShell = WScript.CreateObject("WScript.Shell")
        WshShell.AppActivate WScript.Arguments.Item(0)

in the Scilab script the following line:

        host('cscript /B focusonwindow.vbs ""Scilab""')

and here ""Scilab"" is the name of the window (the console) to which the 
focus should be switched.

My current PC runs Windows 7 and I haven't got around to re-implementing 
the above yet but I imagine something similar will be possible.

I don't take any credit for the above.  At the time, I put a query on the 
forum (21 Feb. 2014) and received a reply offering this solution so I 
thank the gentleman who helped me.  He suggested this webpage:  
http://stackoverflow.com/questions/786368/how-to-bring-a-cmd-exe-window-to-top

Good luck,
Adrian.


Adrian Weeks 
Development Engineer, Hardware Engineering EMEA
Office: +44 (0)2920 528500 | Desk: +44 (0)2920 528523 | Fax: +44 (0)2920 
520178
aweeks at hidglobal.com


Unit 3, Cae Gwyrdd,
Green meadow Springs,
Cardiff, UK,
CF15 7AB.
www.hidglobal.com




From:
scilab.20.browseruk at xoxy.net
To:
"users at lists.scilab.org"  <>
Date:
31/03/2016 19:37
Subject:
[Scilab-users] Running an .sce from the command line.
Sent by:
"users" <users-bounces at lists.scilab.org>



Hi,

I can run my .sce file which produces a graph from a file of data from the 
(windows) command line using:

    scilex -f myscript.sce filename.rdat

and that works except:

Once the plot() executes and the graphic window appears, control and focus 
returns to the interactive command line.

That's okay; but it'd would be really nice if the focus remained on the 
graphic window until it was closed and then the scilab shell exited 
automatically. 

Is it possible to arrange for that to happen?

Thanks, Buk.

____________________________________________________________
TRY FREE IM TOOLPACK at http://www.imtoolpack.com/default.aspx?rc=if5
Capture screenshots, upload images, edit and send them to your friends
through IMs, post on Twitter®, Facebook®, MySpace™, LinkedIn® – FAST!



_______________________________________________
users mailing list
users at lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20160401/ee02ca24/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 8425 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/users/attachments/20160401/ee02ca24/attachment.gif>


More information about the users mailing list