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

Home » Public Forums » archive » Re: User prompt with timeout?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: User prompt with timeout? [message #77359] Sun, 28 August 2011 22:06
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
Here's a command line kluge that does some of what you want:

pro getdefval,x
; Give a user 3 seconds to supply a value, otherwise use a default
t= 0
print,'Choose x,y, or z: ',format='(A,$)'
while t lt 30 do begin
wait,0.1
t += 1
x = get_kbrd(0)
if byte(x) ne 0b then break
endwhile
print,' '
if byte(x) NE 0b then print,'Using user supplied value of ',x else begin
x = 'z'
print,'Using default value of z'
endelse

return
end
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Arrow object?
Next Topic: Open a specifically-sized cgWindow

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

Current Time: Thu Oct 09 19:59:32 PDT 2025

Total time taken to generate the page: 0.55693 seconds