[Scilab-users] Start an arrested loop with one keystroke only
Jens
j.s.strom at hslmg.de
Tue Nov 22 12:29:16 CET 2016
Hallo Tim,
Did you mean something like this?:
function b1=stopgoclick()
//left mouse: next image,, middle mous: abort
b=xclick();
b1=b(1)
if b1==3//left mouse: next image
return
elseif b1==4//middle mouse: end script
abort
end
endfunction
x=0:1
for i=1:10
plot(x,i*x)
b1=stopgoclick()
if b1==5//right mouse: break loop
break
end
end
'further commands'
If that is o.k. could you help me to handle the loop break case from
inside the function?
Cheers
Jens
--------------------------------------------
Am 22.11.2016 01:36, schrieb Tim Wescott [via Scilab / Xcos - Mailing
Lists Archives]:
> xclick()
>
> On Mon, 2016-11-21 at 17:22 -0700, Jens wrote:
>
> > Hallo Scilab users,
> > I am searching for a convenient way to restart a loop with only
> *one* key
> > or mouse stroke. The loop may generate and show graphics or not. I
> tried
> > xclick, pause, halt, and input with little success. input is closest
> to the
> > target but not close enough.
> >
> > for i=1:3
> > plot()
> > //commands wanted which stops the loop and continues it with
> ONE key
> > or mouse stroke only.
> > //input('click on console and press return')// very close but
> more
> > than one stroke
> > xdel();
> > end
> >
> >
> >
> > --
> > View this message in context:
> http://mailinglists.scilab.org/Start-an-arrested-loop-with-one-keystroke-only-tp4035053.html
> > Sent from the Scilab users - Mailing Lists Archives mailing list
> archive at Nabble.com.
> > _______________________________________________
> > users mailing list
> > [hidden email] </user/SendEmail.jtp?type=node&node=4035055&i=0>
> > http://lists.scilab.org/mailman/listinfo/users
> >
> >
>
> --
>
> Tim Wescott
> www.wescottdesign.com
> Control & Communications systems, circuit & software design.
> Phone: 503.631.7815
> Cell: 503.349.8432
>
>
> _______________________________________________
> users mailing list
> [hidden email] </user/SendEmail.jtp?type=node&node=4035055&i=1>
> http://lists.scilab.org/mailman/listinfo/users
>
>
> ------------------------------------------------------------------------
> If you reply to this email, your message will be added to the
> discussion below:
> http://mailinglists.scilab.org/Start-an-arrested-loop-with-one-keystroke-only-tp4035053p4035055.html
>
> To unsubscribe from Start an arrested loop with one keystroke only,
> click here
> <http://mailinglists.scilab.org/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4035053&code=ai5zLnN0cm9tQGhzbG1nLmRlfDQwMzUwNTN8LTIyMzcxNjc3Ng==>.
> NAML
> <http://mailinglists.scilab.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
--
View this message in context: http://mailinglists.scilab.org/Start-an-arrested-loop-with-one-keystroke-only-tp4035053p4035056.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20161122/7338a04c/attachment.htm>
More information about the users
mailing list