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

Adrian.

Thanks. That would probably work; except I long ago disabled 
cscript/jscript/vbscript on my system for security reasons. I'm not sure I'd 
remember now how to re-enable it. (Nor that I would want to; but that's my 
paranoia :)


> you may use f = gcf(); f.visible = "on";
> to bring the window to the foreground whether it is not iconified.

Samuel,

I tried the above, but it made no difference.

The problem is not that the window is iconified; just that when the script 
completes and control returns to the scilab shell, its console widow is brought 
to the front and so the graphics window get hidden by it.


However, you mentioned using a loop (earlier) and that triggered a thought and 
lead to a solution.

while(1) sleep(100), end;


It simply prevents the script ending so the graphics window stays on top; but 
the script remains responsive so that when I close the graphics window, your

    f.closerequestfcn = "exit(0)";

kicks in and terminates the whole thing. 

And that's nearly perfect. I run this from the command line:

    "C:\Program Files\scilab-5.5.2\bin\SciLex.exe" -noatomsautoload -f 
graphRdat.sce *.rdat

The script loads up all the .rdat files in the cwd, graphs the data inside, and 
leaves the graph on top for my perusal. 

When I'm done, I close the graph and I get returned to the command lien where I 
ran the command.

----------

So then I thought I could go one step further. I redefined the standard file 
associations as follows:

    C:\>assoc .sce
    .sce=Scilab5.sce

    C:\>ftype Scilab5.sce
    Scilab5.sce="C:\Program Files\scilab-5.5.2\bin\wscilex.exe" -O "%1"

    C:\Motor>ftype Scilab5.sce="C:\Program Files\scilab-5.5.2\bin\scilex.exe" 
-nb -noatomsautoload -f "%1" %*
    Scilab5.sce="C:\Program Files\scilab-5.5.2\bin\scilex.exe" -nb 
-noatomsautoload -f "%1" %*

    C:\>set pathext=.pl;.COM;.EXE;.BAT;.CMD;.PY;.PYW;.SCE;

so that I could just type:

    C:\>graphRdat *.rdat

and that invokes the script, draws the graphs, waits for me to close the window 
and exits back to the command prompt.

Perfect!

Now all I need to resolve is my problem with setting the colors for plot2d() so 
that I can get nice logplot axis and I'm done. 

Thanks all.

____________________________________________________________
FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop!
Check it out at http://www.inbox.com/earth



_______________________________________________
users mailing list
[email protected]
http://lists.scilab.org/mailman/listinfo/users

Reply via email to