Re: script interruption (suite)

2010-11-17 Thread Ian McKnight
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 resultcr 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



On 17 November 2010 17:53, Yves COPPE yvesco...@skynet.be wrote:

 Hi list


 i've made a fld appearing on the screen
 this fld show a text (coming from a variable)
 this fld  is locktext
 his fld contains the script

 on mouseUp
 global gFlagEnd
 put true into gFlagEnd
 end mouseUp


 the fld does appear
 when I click inside the fld, the fld disappears
 it's OK

 BUT
 i'd like that the fld will disapear spontaneously after 5 seconds

 how can I add this command to the script below ?


 my script

 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 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
  exit to top
   end if
 end toggleexercice


 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


Re: script interruption (suite)

2010-11-17 Thread Yves COPPE

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 resultcr 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


Re: script interruption (suite)

2010-11-17 Thread Ian McKnight
Hi Yves

Try moving the lines

send secondTimer to me in 5 Sec
-- record the message ID
put the resultcr 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 resultcr 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


Re: script interruption (suite)

2010-11-17 Thread Yves COPPE

Le 17 nov. 2010 à 21:26, Ian McKnight a écrit :

 Hi Yves
 
 Try moving the lines
 
 send secondTimer to me in 5 Sec
 -- record the message ID
 put the resultcr 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.
 


Hi Ian

no changes alas ...
after 5 secs, the fld doesn't disappear ...

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


Re: script interruption (suite)

2010-11-17 Thread Yves COPPE

Le 17 nov. 2010 à 21:26, Ian McKnight a écrit :

 Hi Yves
 

Hi Ian,


I have noticed that
command secondTimer
global gEndFlag
   if gFlagEnd is false then put True into gFlagEnd
 end secondTimer



this command is well activated after 5 secs but the fld doesn't disappear
something misses !


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


Re: script interruption (suite)

2010-11-17 Thread Yves COPPE

Le 17 nov. 2010 à 21:26, Ian McKnight a écrit :

 Hi Yves
 
 Try moving the lines
 
 send secondTimer to me in 5 Sec
 -- record the message ID
 put the resultcr 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
 


Hi Ian


sorry, i've made a typo !
after correction, it works great ! yesss!!
many thanks 


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


Re: script interruption (suite)

2010-11-17 Thread Ian McKnight
Glad to be of help.

On 17 November 2010 21:25, Yves COPPE yvesco...@skynet.be wrote:


 Le 17 nov. 2010 à 21:26, Ian McKnight a écrit :

  Hi Yves
 
  Try moving the lines
 
  send secondTimer to me in 5 Sec
  -- record the message ID
  put the resultcr 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
 


 Hi Ian


 sorry, i've made a typo !
 after correction, it works great ! yesss!!
 many thanks 


 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