comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » keypressed pauses program - how to do that?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: keypressed pauses program - how to do that? [message #3154 is a reply to message #3067] Sat, 26 November 1994 00:07 Go to previous messageGo to previous message
polysci_info is currently offline  polysci_info
Messages: 3
Registered: September 1994
Junior Member
In article <39ge03$1do7@jurpool0.rz.uni-frankfurt.de>, frank@chaos.uni-frankfurt.dbp.de (Frank Hoffsuemmer) writes:

: ...It would be much nicer to have something
: like a key-controled slide-show, where e.g. <space> toggles pause/slide mode
: and e.g <return> (in pause mode) advances the images manually.
: I know there's some function for keyboard-stuff in IDL, but I don't know it's
: name, and I have no idea how to implement it, that it works the waz I described
: above. Maybe somebody wrote something similar an can help me out now.

Here's something I hacked together for a customer who wanted a pause until
one of three events occurred--a mouse button click, a keyboard press, or
a time out. Maybe you can change the loop logic and use it. Note that this
is PV~WAVE, so I don't know how IDL time/date functions apply.

----8<--------8<--------8<----CUT HERE----8<--------8<--------8<----
pro user_continue

minute=1d0/(24*60)

t=today()
start=t.julian

repeat begin

cursor,x,y,/nowait
button=!err
button_press=button ne 0

key=byte(get_kbrd(0))
key_press=key(0) ne 0

t=today()
time_out=t.julian ge start+minute/2
endrep until button_press or key_press or time_out
end
----8<--------8<--------8<----CUT HERE----8<--------8<--------8<----

Good luck,

Mark Thomas
Technical Director

Polygrafix
Agents for PV~WAVE and other VNI products in Sub-Saharan Africa

Post: PO Box 85385 Email: PolySci_Info@is.co.za
Emmarentia 2029 Tel: +27 11 486-0050
South Africa FAX: +27 11 486-2757
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Floating Point Bug on Intel Pentium CPUs
Next Topic: Q: square plots in IDL

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:13:00 PDT 2025

Total time taken to generate the page: 0.00390 seconds