The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 895 - File: showthread.php PHP 7.2.34 (Linux)
File Line Function
/showthread.php 895 errorHandler->error




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dialog Variables
#1
I'm having a problem with this dialog cuz the value for the z variable isn't being carried over when the 'stop' button is being pushed. Can anyone tell me why?

thanks.

Function Quick_Timer
Code:
Copy      Help
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages
double- x y z
str a
VARIANT v
if(!ShowDialog("Quick_Timer" &Quick_Timer 0 0 64 0 0 0 -127 241)) ret
;BEGIN DIALOG
;0 "" 0x90C80A44 0x100 0 0 57 61 "Timer"
;3 Static 0x54000000 0x0 0 0 56 10 "Start Time"
;5 Static 0x54000000 0x0 0 12 56 10 "Total Time"
;6 Button 0x54032000 0x0 4 26 48 14 "Start"
;7 Button 0x5C032000 0x0 4 44 48 14 "Stop"
;END DIALOG
;DIALOG EDITOR: "" 0x2030002 "" "" ""

ret
;messages
sel message
,case WM_ACTIVATE
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case 6;;Start time
,,_s.time("%X")
,,_s.setwintext(id(3 win("Timer")))
,,a.setwintext(id(5 win("Timer")))
,,z=GetTickCount
,,EnableWindow(id(6 win("Timer"))0)
,,EnableWindow(id(7 win("Timer"))1)
,case 7;;Stop time
,,EnableWindow(id(6 win("Timer"))1)
,,EnableWindow(id(7 win("Timer"))0)
,,y=GetTickCount
,,x=y-z
,,x=(((x/1000)/60)/60)
,,;out x
,,v.round(x 2)
,,x=v
,,_s=x
,,_s.setwintext(id(5 win("Timer")))
,,_s.setclip
,case IDOK

,case IDCANCEL
ret 1
An old blog on QM coding and automation.

The Macro Hook


Messages In This Thread

Forum Jump:


Users browsing this thread: 6 Guest(s)