Waiting for the train
Mike Bonner
bonnmike at gmail.com
Thu Sep 22 17:23:12 EDT 2016
Yeah, if you want to use wait..
wait 18000 is blocking
wait 18000 with messages is not blocking
My preference is the send in time as shown by paul.
On Thu, Sep 22, 2016 at 2:33 PM, Richmond <richmondmathewson at gmail.com>
wrote:
> You Rock:
>
> http://forums.livecode.com/viewtopic.php?f=7&t=27986
>
> Thanks so much.
>
> Richmond.
>
>
> On 22.09.2016 23:13, Paul Dupuis wrote:
>
>> You probably want to restructure your handler, so that instead of a
>> repeat loop, it calls itself using send <message> in <time>
>>
>> So something like:
>>
>> local KOUNT
>>
>> on startMyThing
>> put 1 into KOUNT
>> send "doMyThing" to me
>> end startMyThing
>>
>> on doMyThing
>> add 1 to KOUNT
>> if KOUNT <= 1003 then send "doMyThing" to me in 18000 ticks
>> end doMyThing
>>
>>
>> You kick it off by calling startMyThing to initialize things and then it
>> keep calling itself (doMyThing) every 5 minutes until KOUNT exceed 1003.
>> All other messages - menu items, mouse clicks, etc. should be handled
>> normally.
>>
>>
>> On 9/22/2016 3:58 PM, Richmond wrote:
>>
>>> Well . . . that works as far as menu commands from the revMenubar
>>> stack go, but it still blocks
>>> mouseClicks on the revTools stack and keyboard commands . . .
>>>
>>> Richmond.
>>>
>>> On 22.09.2016 22:55, Richmond wrote:
>>>
>>>> Thanks.
>>>>
>>>> Where?
>>>>
>>>> wait 18000 ticks with messages
>>>>
>>>> ?
>>>>
>>>> Richmond.
>>>>
>>>> On 22.09.2016 22:38, Mike Bonner wrote:
>>>>
>>>>> add "with messages"
>>>>>
>>>>> On Thu, Sep 22, 2016 at 1:37 PM, Richmond <richmondmathewson at gmail.com
>>>>> >
>>>>> wrote:
>>>>>
>>>>> I have a stack that sits around as a Palette with a script in it that
>>>>>> repeats itself every 18000 ticks (that's 5 minutes to Thee and Me)
>>>>>> with
>>>>>> a code like this:
>>>>>>
>>>>>> *put 1 into KOUNT**
>>>>>> **repeat until KOUNT = 1003*
>>>>>> /do various jolly things/
>>>>>> *add 1 to KOUNT**
>>>>>> **wait 18000 ticks**
>>>>>> **end repeat*
>>>>>>
>>>>>> The "wait 18000 ticks" seems to be locking up the whole IDE so I
>>>>>> cannot
>>>>>> get on and do other things . . .
>>>>>>
>>>>>> Would be grateful if anyone could suggest a way round this.
>>>>>>
>>>>>> Richmond.
>>>>>> _______________________________________________
>>>>>> use-livecode mailing list
>>>>>> use-livecode at lists.runrev.com
>>>>>> Please visit this url to subscribe, unsubscribe and manage your
>>>>>> subscription preferences:
>>>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>>>>
>>>>>> _______________________________________________
>>>>> use-livecode mailing list
>>>>> use-livecode at lists.runrev.com
>>>>> Please visit this url to subscribe, unsubscribe and manage your
>>>>> subscription preferences:
>>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>>>
>>>>
>>> _______________________________________________
>>> use-livecode mailing list
>>> use-livecode at lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>
>>>
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
More information about the use-livecode
mailing list