Its a reaction test. Its to see how long it takes for you to react on a certain event.
It highlights the letter A or B or C.
Its then up to you to click the matching button.
It started by right clicking the channel, and select: Recation Test, or type: /react.
Have fun.
menu channel {
Reaction Test: /react
}
alias React { dialog -md React React }
dialog React {
size -1 -1 100 125
option -dbu
title "Reaction Test."
box "Reaction Speed", 1, 5 5 90 100
text "Click the matching button.",8, 10 15 80 20, center
text "A", 2, 33 28 15 15, center
text "B", 3, 47 28 15 15, center
text "C", 4, 61 28 15 15, center
button "A", 5, 33 43 13 20, center
button "B", 6, 48 43 13 20, center
button "C", 7, 63 43 13 20, center
box "Result:", 9, 5 65 90 40
text "Speed:", 10, 10 76 25 10
edit "", 11, 40 75 50 10, read
text "Best:", 14, 10 90 25 10
edit "", 15, 40 90 50 10, read
button "Start", 12, 15 110 30 10
button "Copy", 13, 55 110 30 10
}
on *:dialog:React:*:* {
if ($devent == init) { did -b React 2,3,4 | set %react.keypress 0 | $iif(%react.pr,did -a React 15 $bytes(%react.pr,b) $+ ms,did -a React 15 0) }
if ($devent == sclick) {
if ($did == 12) {
if (%react.keypress == 0) {
did -b React 2,3,4
echo 3 -ag - When one of the letters lights up, press the matching button.
set %react.ran $rand(2,4)
.timer 1 %react.ran /did -e React %react.ran
.timer 1 %react.ran /set %react.ticks $ticks
set %react.keypress 1
}
else { echo 3 -ag - You have to press the matching button to the letter first, before you can start again! }
}
elseif ($did == 13) {
if ($did(11).text) { if ($did(15).text || $did(11).text) { clipboard $null | clipboard -an Reaction speed: $did(11).text $+ , Personal best: $did(15).text | echo 3 -ag - Copied to clipboard. Press CTRL+V to paste. } }
}
elseif ($did == 5) {
if (%react.keypress == 1) {
if ($calc($did - 3) == %react.ran) {
did -ar React 11 $bytes($calc($ticks - %react.ticks),b) $+ ms
set %react.keypress 0
if (!%react.pr) { set %react.pr 999999 }
if ($calc($ticks - %react.ticks) <= %react.pr) { set %react.pr $calc($ticks - %react.ticks) | did -ar React 15 $bytes(%react.pr,b) $+ ms }
}
}
}
elseif ($did == 6) {
if (%react.keypress == 1) {
if ($calc($did - 3) == %react.ran) {
did -ar React 11 $bytes($calc($ticks - %react.ticks),b) $+ ms
set %react.keypress 0
if (!%react.pr) { set %react.pr 999999 }
if ($calc($ticks - %react.ticks) <= %react.pr) { set %react.pr $calc($ticks - %react.ticks) | did -ar React 15 $bytes(%react.pr,b) $+ ms }
}
}
}
elseif ($did == 7) {
if (%react.keypress == 1) {
if ($calc($did - 3) == %react.ran) {
did -ar React 11 $bytes($calc($ticks - %react.ticks),b) $+ ms
set %react.keypress 0
if (!%react.pr) { set %react.pr 999999 }
if ($calc($ticks - %react.ticks) <= %react.pr) { set %react.pr $calc($ticks - %react.ticks) | did -ar React 15 $bytes(%react.pr,b) $+ ms }
}
}
}
}
if ($devent == close) { echo 3 -ag - Thanks for testing your Reaction Speed. }
}