| View previous topic :: View next topic |
| Author |
Message |
filip Valued Contributor


Joined: 07 Aug 2004 Posts: 340
|
Posted: Thu Jan 13, 2005 10:02 am Post subject: Dialog(2) and timer |
|
|
TITLE By Mac
DIALOG CREATE,Main,-1,0,200,100
DIALOG ADD,BUTTON,Child,5,5,150,20,"Open Child Window"
dialog add,text,text1,30,0
DIALOG SHOW
:EVLOOP
WAIT EVENT, 1
rem -- %e is event, %d is dialog number that issued it (0,1,2,etc.) --
PARSE "%e;%d", @event(d)
if @equal(%e, "TIMER")
goto TIMER
end
DIALOG SELECT, %d
goto %e
:ChildBUTTON
rem -- Allow only one --
if @not(@winexists("Child"))
DIALOG CREATE,"Child",-1,0,100,50,NOMIN
DIALOG ADD,BUTTON,Test,5,5,50,20
DIALOG SHOW
end
goto EVLOOP
:TestBUTTON
INFO Dialog = %d@cr()@cr()Event = %e@tab()
goto EVLOOP
:CLOSE
if @greater(%d, 0)
DIALOG CLOSE
rem -- Kill extra CLOSE event -
%e = @event()
goto EVLOOP
end
EXIT
:Timer
%t = @datetime(hh:nn:ss)
dialog set,text1,%T
goto evloop
This dont work... |
|
| Back to top |
|
 |
Hooligan VDS Developer


Joined: 28 Oct 2003 Posts: 480 Location: California
|
Posted: Thu Jan 13, 2005 3:40 pm Post subject: |
|
|
Try this:
| Code: |
TITLE By Mac
DIALOG CREATE,Main,-1,0,200,100
DIALOG ADD,BUTTON,Child,5,5,150,20,"Open Child Window"
dialog add,text,text1,30,0
DIALOG SHOW
:EVLOOP
WAIT EVENT, 1
rem -- %e is event, %d is dialog number that issued it (0,1,2,etc.) --
PARSE "%e;%d", @event(d)
rem if @equal(%e, "TIMER")
rem gosub TIMER
rem end
DIALOG SELECT, %d
goto %e
:ChildBUTTON
rem -- Allow only one --
if @not(@winexists("Child"))
DIALOG CREATE,"Child",-1,0,100,50,NOMIN
DIALOG ADD,BUTTON,Test,5,5,50,20
DIALOG SHOW
end
goto EVLOOP
:TestBUTTON
INFO Dialog = %d@cr()@cr()Event = %e@tab()
goto EVLOOP
:CLOSE
if @greater(%d, 0)
DIALOG CLOSE
rem -- Kill extra CLOSE event -
%e = @event()
goto EVLOOP
end
EXIT
:Timer
%t = @datetime(hh:nn:ss)
dialog set,text1,%T
goto evloop
|
Hooligan _________________ Hooligan
Why be normal? |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|