alias hour_grid {
var %dlg = hour_grid
/dialog $iif($dialog(%dlg),-vie,-md) %dlg %dlg
}
dialog hour_grid {
title "Hour Grid"
size -1 -1 100 245
option dbu
box "", 999, 0 0 100 245
edit "", 1, 5 10 30 10, disabled center
edit "", 2, 5 19 30 10, disabled center
edit "", 3, 5 28 30 10, disabled center
edit "", 4, 5 37 30 10, disabled center
edit "", 5, 5 46 30 10, disabled center
edit "", 6, 5 55 30 10, disabled center
edit "", 7, 5 64 30 10, disabled center
edit "", 8, 5 73 30 10, disabled center
edit "", 9, 5 82 30 10, disabled center
edit "", 10, 5 91 30 10, disabled center
edit "", 11, 5 100 30 10, disabled center
edit "", 12, 5 109 30 10, disabled center
edit "", 13, 5 118 30 10, disabled center
edit "", 14, 5 127 30 10, disabled center
edit "", 15, 5 136 30 10, disabled center
edit "", 16, 5 145 30 10, disabled center
edit "", 17, 5 154 30 10, disabled center
edit "", 18, 5 163 30 10, disabled center
edit "", 19, 5 172 30 10, disabled center
edit "", 20, 5 181 30 10, disabled center
edit "", 21, 5 190 30 10, disabled center
edit "", 22, 5 199 30 10, disabled center
edit "", 23, 5 208 30 10, disabled center
edit "", 24, 5 217 30 10, disabled center
edit "", 25, 34 10 30 10, center
edit "", 26, 34 19 30 10, disabled center
edit "", 27, 34 28 30 10, disabled center
edit "", 28, 34 37 30 10, disabled center
edit "", 29, 34 46 30 10, disabled center
edit "", 30, 34 55 30 10, disabled center
edit "", 31, 34 64 30 10, disabled center
edit "", 32, 34 73 30 10, disabled center
edit "", 33, 34 82 30 10, disabled center
edit "", 34, 34 91 30 10, disabled center
edit "", 35, 34 100 30 10, disabled center
edit "", 36, 34 109 30 10, disabled center
edit "", 37, 34 118 30 10, disabled center
edit "", 38, 34 127 30 10, disabled center
edit "", 39, 34 136 30 10, disabled center
edit "", 40, 34 145 30 10, disabled center
edit "", 41, 34 154 30 10, disabled center
edit "", 42, 34 163 30 10, disabled center
edit "", 43, 34 172 30 10, disabled center
edit "", 44, 34 181 30 10, disabled center
edit "", 45, 34 190 30 10, disabled center
edit "", 46, 34 199 30 10, disabled center
edit "", 47, 34 208 30 10, disabled center
edit "", 48, 34 217 30 10, disabled center
edit "", 49, 63 10 30 10, center
edit "", 50, 63 19 30 10, center
edit "", 51, 63 28 30 10, center
edit "", 52, 63 37 30 10, center
edit "", 53, 63 46 30 10, center
edit "", 54, 63 55 30 10, center
edit "", 55, 63 64 30 10, center
edit "", 56, 63 73 30 10, center
edit "", 57, 63 82 30 10, center
edit "", 58, 63 91 30 10, center
edit "", 59, 63 100 30 10, center
edit "", 60, 63 109 30 10, center
edit "", 61, 63 118 30 10, center
edit "", 62, 63 127 30 10, center
edit "", 63, 63 136 30 10, center
edit "", 64, 63 145 30 10, center
edit "", 65, 63 154 30 10, center
edit "", 66, 63 163 30 10, center
edit "", 67, 63 172 30 10, center
edit "", 68, 63 181 30 10, center
edit "", 69, 63 190 30 10, center
edit "", 70, 63 199 30 10, center
edit "", 71, 63 208 30 10, center
edit "", 72, 63 217 30 10, center
button "Copy To Clipboard", 100, 4 230 90 12
}
on *:DIALOG:hour_grid:INIT:*: {
var %h = 1
while (%h < 25) {
/did -ra $dname %h %h
/inc %h
}
}
on *:DIALOG:hour_grid:SCLICK:*: {
if ($did == 100) {
var %l = 1, %space = $chr(9)
while (%l < 25) {
var %col1 = %l, %col2 = %l + 24, %col3 = %l + 48
/clipboard $iif(%l == 1,-n,-an) $+($did(%col1).text,%space,$did(%col2).text,%space,$did(%col3).text)
/inc %l
}
}
}
on *:DIALOG:hour_grid:EDIT:*: {
if ($did == 25) {
var %e = 26, %num = $did($did).text + 1
if (%num isnum) {
while (%e < 49) {
/did -ra $dname %e %num
/inc %e
/inc %num
}
}
}
}