I didn’t finish the “about” or “help” functions… well because I didn’t want to.
You should be able to figure it out though.
just be sure to set the options before running for the first time.
You will need two text files and one sound file located here or just let the script download them for you:
http://www.autohotke.../ALPHA_LIST.txt
http://www.autohotke...PHRASE_LIST.txt
http://www.autohotke...gma/correct.wav
(Place them in the script directory)
#notrayicon
setbatchlines, -1
urldownloadtofile, http://www.autohotkey.net/~godsstigma/ALPHA_LIST.txt, %a_scriptdir%\ALPHA_LIST.txt
urldownloadtofile, http://www.autohotkey.net/~godsstigma/PHRASE_LIST.txt, %a_scriptdir%\PHRASE_LIST.txt
urldownloadtofile, http://www.autohotkey.net/~godsstigma/correct.wav, %a_scriptdir%\correct.wav
nothing =
iniread, displaytype, %a_scriptdir%\settings.ini, options, type
iniread, value, %a_scriptdir%\settings.ini, options, value
iniread, timeout, %a_scriptdir%\settings.ini, options, timeout
if timeout = 0.25
{
timeoutsleep = 250
}
if timeout = 0.5
{
timeoutsleep = 500
}
if timeout = 0.75
{
timeoutsleep = 750
}
if timeout = 1
{
timeoutsleep = 1000
}
menu, optionmenu, add, &Settings, options
menu, optionmenu, add, &Exit, guiclose
menu, aboutmenu, add, &About, about
menu, aboutmenu, add, &Help, help
menu, menubar1, add, &Game, :optionmenu
menu, menubar1, add, &?, :aboutmenu
gui, menu, menubar1
gui, font, s12
Gui, Add, Text, x36 y97 w250 h45 +Center +Border vtextshow, Press "Test Me" to begin.
gui, font, s8
Gui, Add, Edit, x36 y217 w250 h20 +Center vinput,
;Gui, Add, Text, x36 y77 w90 h20 +Center, Remember this:
Gui, Add, Text, x36 y197 w90 h20 +Center, Answer
Gui, Add, Button, x106 y257 w100 h30 gbegin, Test me
Gui, Add, Text, x116 y27 w40 h20 , Right =
Gui, Add, Text, x116 y47 w50 h20 , Wrong =
Gui, Add, Text, x176 y27 w40 h20 vRight,
Gui, Add, Text, x176 y47 w40 h20 vWrong,
ans_right = 0
ans_wrong = 0
guicontrol,, right, %ans_right%
guicontrol,, wrong, %ans_wrong%
Gui, Show, h315 w330, Random Memory Tester
Gui, 2: Add, DropDownList, x26 y47 w110 h200 vOpt_Displaytype, Integer|Alpha|Phrase
Gui, 2: Add, DropDownList, x26 y107 w110 h200 VOpt_Value, 2|3|4|5|6|7
Gui, 2: Add, Text, x26 y27 w110 h20 +Center, Display Type
Gui, 2: Add, Text, x26 y87 w110 h20 +Center, Number of Values
Gui, 2: Add, DropDownList, x26 y167 w110 h200 vOpt_Displaytimeout, 0.25|0.5|0.75|1
Gui, 2: Add, Text, x26 y147 w110 h20 +Center, Display Timeout
Gui, 2: Add, Button, x26 y217 w110 h30 gsubmit, Submit
Return
;###################################################
begin:
gui,submit,nohide
guicontrol,, textshow, %nothing%
SetTitleMatchMode, 2
controlfocus, Edit1, Random Memory Tester
goto, MainGenerate
return
;###################################################
numpadenter::
enter::
gui, submit, nohide
if input = %show%
{
ans_right++
guicontrol,, right, %ans_right%
soundplay, %a_scriptdir%\correct.wav
sleep, 1000
guicontrol,, input, %nothing%
goto, MainGenerate
return
}
if input =
{
ans_wrong++
guicontrol,, wrong, %ans_wrong%
guicontrol,, input, %nothing%
msgbox, 16, Wrong!!!, Sorry... but you are an idiot., 1
sleep, 1000
goto, MainGenerate
return
}
else
{
ans_wrong++
guicontrol,, wrong, %ans_wrong%
guicontrol,, input, %nothing%
msgbox, 16, Wrong!!!, Sorry... but you are an idiot., 1
sleep, 1000
goto, MainGenerate
return
}
return
;###################################################
MainGenerate:
Gui, submit, nohide
if displaytype = integer
{
controlfocus, Edit1, Random Memory Tester
random, 1, 0, 9
random, 2, 0, 9
random, 3, 0, 9
random, 4, 0, 9
random, 5, 0, 9
random, 6, 0, 9
random, 7, 0, 9
if value = 2
{
show = %1%%2%
guicontrol,, textshow, %show%
sleep, %timeoutsleep%
guicontrol,, textshow, %nothing%
return
}
if value = 3
{
show = %1%%2%%3%
guicontrol,, textshow, %show%
sleep, %timeoutsleep%
guicontrol,, textshow, %nothing%
return
}
if value = 4
{
show = %1%%2%%3%%4%
guicontrol,, textshow, %show%
sleep, %timeoutsleep%
guicontrol,, textshow, %nothing%
return
}
if value = 5
{
show = %1%%2%%3%%4%%5%
guicontrol,, textshow, %show%
sleep, %timeoutsleep%
guicontrol,, textshow, %nothing%
return
}
if value = 6
{
show = %1%%2%%3%%4%%5%%6%
guicontrol,, textshow, %show%
sleep, %timeoutsleep%
guicontrol,, textshow, %nothing%
return
}
if value = 7
{
show = %1%%2%%3%%4%%5%%6%%7%
guicontrol,, textshow, %show%
sleep, %timeoutsleep%
guicontrol,, textshow, %nothing%
return
}
}
if displaytype = alpha
{
controlfocus, Edit1, Random Memory Tester
Random, a, 1, 26
Random, b, 1, 26
Random, c, 1, 26
Random, d, 1, 26
Random, e, 1, 26
Random, f, 1, 26
Random, g, 1, 26
filereadline, 1, %a_scriptdir%\alpha_list.txt, %a%
filereadline, 2, %a_scriptdir%\alpha_list.txt, %b%
filereadline, 3, %a_scriptdir%\alpha_list.txt, %c%
filereadline, 4, %a_scriptdir%\alpha_list.txt, %d%
filereadline, 5, %a_scriptdir%\alpha_list.txt, %e%
filereadline, 6, %a_scriptdir%\alpha_list.txt, %f%
filereadline, 7, %a_scriptdir%\alpha_list.txt, %g%
if value = 2
{
show = %1%%2%
guicontrol,, textshow, %show%
sleep, %timeoutsleep%
Guicontrol,, textshow, %nothing%
return
}
if value = 3
{
show = %1%%2%%3%
guicontrol,, textshow, %show%
sleep, %timeoutsleep%
Guicontrol,, textshow, %nothing%
return
}
if value = 4
{
show = %1%%2%%3%%4%
guicontrol,, textshow, %show%
sleep, %timeoutsleep%
Guicontrol,, textshow, %nothing%
return
}
if value = 5
{
show = %1%%2%%3%%4%%5%
guicontrol,, textshow, %show%
sleep, %timeoutsleep%
guicontrol,, textshow, %nothing%
return
}
if value = 6
{
show = %1%%2%%3%%4%%5%%6%
guicontrol,, textshow, %show%
sleep, %timeoutsleep%
guicontrol,, textshow, %nothing%
return
}
if value = 7
{
show = %1%%2%%3%%4%%5%%6%%7%
guicontrol,, textshow, %show%
sleep, %timeoutsleep%
guicontrol,, textshow, %nothing%
return
}
}
if displaytype = phrase
{
controlfocus, Edit1, Random Memory Tester
Random, a, 1, 103
Random, b, 1, 103
Random, c, 1, 103
Random, d, 1, 103
Random, e, 1, 103
Random, f, 1, 103
Random, g, 1, 103
filereadline, 1, %a_scriptdir%\phrase_list.txt, %a%
filereadline, 2, %a_scriptdir%\phrase_list.txt, %b%
filereadline, 3, %a_scriptdir%\phrase_list.txt, %c%
filereadline, 4, %a_scriptdir%\phrase_list.txt, %d%
filereadline, 5, %a_scriptdir%\phrase_list.txt, %e%
filereadline, 6, %a_scriptdir%\phrase_list.txt, %f%
filereadline, 7, %a_scriptdir%\phrase_list.txt, %g%
if value = 2
{
show = %1% %2%
guicontrol,, textshow, %show%
sleep, %timeoutsleep%
Guicontrol,, textshow, %nothing%
return
}
if value = 3
{
show = %1% %2% %3%
guicontrol,, textshow, %show%
sleep, %timeoutsleep%
Guicontrol,, textshow, %nothing%
return
}
if value = 4
{
show = %1% %2% %3% %4%
guicontrol,, textshow, %show%
sleep, %timeoutsleep%
Guicontrol,, textshow, %nothing%
return
}
if value = 5
{
show = %1% %2% %3% %4% %5%
guicontrol,, textshow, %show%
sleep, %timeoutsleep%
guicontrol,, textshow, %nothing%
return
}
if value = 6
{
show = %1% %2% %3% %4% %5% %6%
guicontrol,, textshow, %show%
sleep, %timeoutsleep%
guicontrol,, textshow, %nothing%
return
}
if value = 7
{
show = %1% %2% %3% %4% %5% %6% %7%
guicontrol,, textshow, %show%
sleep, %timeoutsleep%
guicontrol,, textshow, %nothing%
return
}
}
return
;###################################################
submit:
gui, submit, nohide
gui, 2: hide
iniwrite, %Opt_Displaytype%, %a_scriptdir%\settings.ini, options, type
iniwrite, %Opt_value%, %a_scriptdir%\settings.ini, options, value
iniwrite, %Opt_displaytimeout%, %a_scriptdir%\settings.ini, options, timeout
gui, 2: destroy
reload
return
;###################################################
options:
Gui, 2: Show, h276 w165, Options
return
;###################################################
about:
msgbox Something here soon
return
;###################################################
help:
msgbox Something here soon
return
;###################################################
GuiClose:
ExitApp
[/url]




