<font size=2 face="sans-serif">Hi,</font>
<br>
<br><font size=2 face="sans-serif">I don't know if this will be any help
to you in this particular case but it may be of some interest.</font>
<br>
<br><font size=2 face="sans-serif">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.</font>
<br>
<br><font size=2 face="sans-serif">My PC at the time was running Windows
XP and I had the following arrangement:</font>
<br>
<br><font size=2 face="sans-serif">        In
a folder, a file called   "focusonwindow.vbs"  containing
these two lines:</font>
<br>
<br><font size=2 face="sans-serif">        Set
WshShell = WScript.CreateObject("WScript.Shell")</font>
<br><font size=2 face="sans-serif">        WshShell.AppActivate
WScript.Arguments.Item(0)</font>
<br>
<br><font size=2 face="sans-serif">in the Scilab script the following line:</font>
<br>
<br><font size=2 face="sans-serif">        host('cscript
/B focusonwindow.vbs ""Scilab""')</font>
<br>
<br><font size=2 face="sans-serif">and here ""Scilab""
is the name of the window (the console) to which the focus should be switched.</font>
<br>
<br><font size=2 face="sans-serif">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.</font>
<br>
<br><font size=2 face="sans-serif">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:  </font><a href="http://stackoverflow.com/questions/786368/how-to-bring-a-cmd-exe-window-to-top"><font size=2 face="sans-serif">http://stackoverflow.com/questions/786368/how-to-bring-a-cmd-exe-window-to-top</font></a>
<br>
<br><font size=2 face="sans-serif">Good luck,</font>
<br><font size=2 face="sans-serif">Adrian.</font>
<br><font size=2 face="sans-serif"><br>
</font>
<table>
<tr>
<td><font size=2 color=#2f2f2f face="Arial"><b>Adrian Weeks </b></font><font size=1 color=#5f5f5f face="Arial"><br>
Development Engineer, Hardware Engineering EMEA<br>
Office: +44 (0)2920 528500 | Desk: +44 (0)2920 528523 | Fax: +44 (0)2920
520178</font><font size=1 color=blue face="Arial"><u><br>
</u></font><a href=mailto:aweeks@hidglobal.com><font size=1 color=blue face="Arial"><u>aweeks@hidglobal.com</u></font></a><font size=1 color=#5f5f5f face="Arial"><br>
</font>
<tr>
<td><a href=http://www.hidglobal.com/><img src=cid:_1_0AC634700AC63070002F4B4A80257F88 width=312 height=48 alt="HID Global Logo"></a>
<tr>
<td><font size=1 color=#5f5f5f face="Arial">Unit 3, Cae Gwyrdd,<br>
Green meadow Springs,<br>
Cardiff, UK,<br>
CF15 7AB.</font><font size=1 color=blue face="Arial"><u><br>
</u></font><a href=http://www.hidglobal.com/><font size=1 color=blue face="Arial"><u>www.hidglobal.com</u></font></a></table>
<br>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">From:</font>
<td><font size=1 face="sans-serif">scilab.20.browseruk@xoxy.net</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">To:</font>
<td><font size=1 face="sans-serif">"users@lists.scilab.org"  <></font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">Date:</font>
<td><font size=1 face="sans-serif">31/03/2016 19:37</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">Subject:</font>
<td><font size=1 face="sans-serif">[Scilab-users] Running an .sce from
the command line.</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">Sent by:</font>
<td><font size=1 face="sans-serif">"users" <users-bounces@lists.scilab.org></font></table>
<br>
<hr noshade>
<br>
<br>
<br><tt><font size=2>Hi,<br>
<br>
I can run my .sce file which produces a graph from a file of data from
the (windows) command line using:<br>
<br>
    scilex -f myscript.sce filename.rdat<br>
<br>
and that works except:<br>
<br>
Once the plot() executes and the graphic window appears, control and focus
returns to the interactive command line.<br>
<br>
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.
<br>
<br>
Is it possible to arrange for that to happen?<br>
<br>
Thanks, Buk.<br>
<br>
____________________________________________________________<br>
TRY FREE IM TOOLPACK at </font></tt><a href="http://www.imtoolpack.com/default.aspx?rc=if5"><tt><font size=2>http://www.imtoolpack.com/default.aspx?rc=if5</font></tt></a><tt><font size=2><br>
Capture screenshots, upload images, edit and send them to your friends<br>
through IMs, post on Twitter®, Facebook®, MySpace™, LinkedIn® – FAST!<br>
<br>
<br>
<br>
_______________________________________________<br>
users mailing list<br>
users@lists.scilab.org<br>
</font></tt><a href=http://lists.scilab.org/mailman/listinfo/users><tt><font size=2>http://lists.scilab.org/mailman/listinfo/users</font></tt></a><tt><font size=2><br>
</font></tt>
<br>
<br>