Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Get Up Timer
#1
So I'm working on a little program that folks around the office can run to help them get up and move every 20 minutes.

Right now I just have a dialog that sets a timer that pops up a message saying "Get Up Now" every 20 minutes, the user closes the message, the timer starts again.
Very simple. But I'd like to get this working a lot better, with more options.

Any suggestions or help would be much appreciated.
-Jim

Function GetUpNow
Code:
Copy      Help
\Dialog_Editor

if(!ShowDialog("" &sub.DlgProc 0)) ret

;BEGIN DIALOG
;0 "" 0x90CA0AC8 0x0 0 0 136 34 "GetUpNow"
;3 Button 0x54032000 0x0 16 8 48 14 "Set Timer"
;4 Button 0x54032000 0x0 72 8 48 14 "Close"
;END DIALOG
;DIALOG EDITOR: "" 0x2040108 "*" "" "" ""

#sub DlgProc
function# hDlg message wParam lParam

sel message
,case WM_INITDIALOG
,int- GetUpTime=20
,GetUpTime=(GetUpTime*1000)*60
,SetTimer hDlg 1 GetUpTime 0
,case WM_TIMER
,sel wParam
,,case 1
,,KillTimer hDlg 1
,,mes "GET UP"
,,SetTimer hDlg 1 GetUpTime 0
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case 3
,KillTimer hDlg 1
,SetTimer hDlg 1 GetUpTime 0
,case 4
,clo hDlg
,case IDOK
,case IDCANCEL
ret 1


Forum Jump:


Users browsing this thread: 1 Guest(s)