Hi Yves Try moving the lines
send secondTimer to me in 5 Sec -- record the message ID put the result&cr after myPendingMessages out of the handler altogether, placing it immediately before the place where the main call to toggleexercice is made. This should mean that a timer is started as soon as you call the main handler. If nothing is touched then the flag should be set to true after 5 secs which is what the mouseclick does anyway. In this case you probably won't need the clearMyPendingMessages handler but, maybe its overkill on my part, whenever I use any send command I always like to clear up aftermyself this way -0 just to make sure. Try that and see. All the best On 17 November 2010 20:12, Yves COPPE <yvesco...@skynet.be> wrote: > > Le 17 nov. 2010 à 19:45, Ian McKnight a écrit : > > > How about sending another send in time message to change the global after > 5 > > seconds? > > I haven't tried itand there may be a more efficient way to code this but > I > > think it should work. > > > > The only thing is you will have quite a number of unneeded calls of the > > secondTimer. To overcome this you need to record the send ID in a > variable > > and then clear these IDs from the pending messages > > > > For more info look up send and cancel in the dictionary > > > > local myPendingMessages > > > > on toggleexercice tDerniereDate > > global gEndFlag > > if gEndFlag is false then > > if tDerniereDate <> empty then > > set the blendLevel of fld "showExercice" to 100 > > show fld "showExercice" > > repeat with x = 100 down to 35 > > set the blendLevel of fld "showExercice" to x > > wait 1 ticks > > end repeat > > end if > > > > send secondTimer to me in 5 Sec > > -- record the message ID > > put the result&cr after myPendingMessages > > > > send toggleexercice to me in 1 > > > > else > > repeat with x = 35 to 100 > > set the blendLevel of fld "showExercice" to x > > wait 1 tick > > end repeat > > hide fld "showExercice" > > clearMyPendingMessages > > exit to top > > end if > > end toggleexercice > > > > > > > > command secondTimer > > if gFlagEnd is false then put True into gFlagEnd > > end secondTimer > > > > command clearMyPendingMessages > > repeat for each line tMsg in myPendingMessages > > cancel tMsg > > end repeat > > put empty into myPendingMessages > > end clearMyPendingMessages > > > > > > > Hi Ian, > > the script above runs but the fld "showExercice" doesn't disappear > sponaneously > I still have to click in the fld to makes it disappear > please do you have another idea for me??? > thank you very much > > Greetings. > > Yves COPPE > yvesco...@skynet.be > > _______________________________________________ > use-revolution mailing list > use-revolution@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-revolution > -- Regards Ian McKnight iangmckni...@gmail.com ======================= _______________________________________________ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution