Guidance
指路人
g.yi.org
Guidance Forums / Reginald Rexx / TIMER

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. TIMER
#13615
Posted by: Michael S 2012-08-18 17:13:42
I would like to a timer to ALL my windows such that if the user doesn't do anything with any one, the timer kicks in. Basically, if window A calls starts a new window script B and the user does nothing there, I want B to cancel. If they do nothing on A then its timer will kick in and A will close.
I tried the following code which works fine for A, but as soon as I select B, return to A, then the timer is no longer in effect. How should I code this ?

again:
DO FOREVER

        ERROR = guiaddctl("TIMER 5000")
	SAY 'Result from add time ***'ERROR'***' 
	guigetmsg()
	CATCH SYNTAX
			CONDITION('M')
			SIGNAL again
			
	CATCH HALT 
	FINALLY
		guidestroywindow()
END

RETURN 0
/* Called by Reginald when a time-out happens for our window. */
wm_timer:
/* Post a WM_CLOSE to simulate the user closing the window. */
guisendmsg(, "POST CLOSE")
/* Return nothing so that this time-out happens only once. */
/* NB NB NB NB Based on the comments from the TIMER example
    I read it as that if I return an empty string, the timer will
   be in effect ALL THE TIME
return ""
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
¥410.00 ·
 
 
¥1,015.00 ·
 
 
¥470.00 ·
 
 
¥296.00 ·
 
 
¥410.00 ·
 
 
¥387.00 ·
© Sun 2024-11-24  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0