Script for executable idle timer

Phil Davis revdev at pdslabs.net
Tue Nov 12 18:51:45 EST 2013


No need to modify the answer dialog. This works:

In a button on my test stack:

    on mouseUp
        start using this stack
        send "updateDialog 9" to fld id 1006 of stack "answer dialog" in
    1 second
        answer "Your world will end in 10 seconds."
    end mouseUp


In the script of my test stack:

    command updateDialog pTime
         if pTime = 0 then
             click at the loc of btn "OK" of stack "answer dialog"
         else
             put "Your world will end in" && pTime && "seconds." into
    the target
             subtract 1 from pTime
             send "updateDialog pTime" to the target in 1 second
         end if
    end updateDialog


Except my world didn't end when the dialog closed. That will require 
more code.

Phil Davis



On 11/12/13, 3:05 PM, Devin Asay wrote:
> On Nov 12, 2013, at 3:45 PM, Mark Wieder wrote:
>
>> Devin-
>>
>> Tuesday, November 12, 2013, 1:39:57 PM, you wrote:
>>
>>> The problem with a dialog box is that there is no way to dismiss
>>> is in a script as far as I know.
>> In the script of the first card of the dialog box:
>>
>> on openCard
>>   send "closeMe" to me in 10 seconds
>> end openCard
>>
>> on closeMe
>>   close this stack
>> end closeMe
> So you'd have to modify the ask and answer dialog stacks in the IDE?
>
> Devin
>
> Devin Asay
> Learn to code with LiveCode University
> http://university.livecode.com
>
>
> _______________________________________________
> 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
>

-- 
Phil Davis




More information about the use-livecode mailing list