Hello Community,
I am an Autohotkey amateur, created some basic scripts here and there but it's the first time I need help from better skilled people because my time is limited in this case and I would like to ask if someone can write me a script or point me in the right direction.
That would be awesome.
I need a graphic surface / gui that shows "words" randomly from a pool of words or multiple pools.
My 6 yo neighbor learns who to read and they start with "mi", "mimi", "mami" and so on. They will learn more and more words and syllables. I would like to make it harder for him. He tries to cheat and tries to remember what word stands where and just repeats it instead of really recognizing the word.
So I would like let a program or script, if possible, show randomly choosen words after clicking a button. Maybe with correct or wrong, to repeat words that he had spoken wrongly more often. Only if possible with AHK ofc.
Sincerely holo
Better "practice how to read" program Topic is solved
Re: Better "practice how to read" program
Here is what I have so far. There is a check to make sure the same word doesn't appear twice in a row.
As far as making words show up more often if they're wrong, that's gonna require a bit more work.
As far as making words show up more often if they're wrong, that's gonna require a bit more work.
Code: Select all
WordList := [ "mi", "mimi", "mami" ]
RepeatCheck = 0
Loop
{
Random, WordNum, 1, WordList.MaxIndex()
if (RepeatCheck = WordNum)
continue
RepeatCheck = %WordNum%
msgbox % WordList[WordNum]
}
Re: Better "practice how to read" program
Thank you very much for your time. This look already very good!ilhom wrote: ↑10 Sep 2019, 16:42Here is what I have so far. There is a check to make sure the same word doesn't appear twice in a row.
As far as making words show up more often if they're wrong, that's gonna require a bit more work.
Code: Select all
WordList := [ "mi", "mimi", "mami" ] RepeatCheck = 0 Loop { Random, WordNum, 1, WordList.MaxIndex() if (RepeatCheck = WordNum) continue RepeatCheck = %WordNum% msgbox % WordList[WordNum] }

If possible could you make the text size bigger? And how could I add a 2nd word pool for example and maybe choose which one? Man, that would be sick

Then I need a Inputbox, right?
Re: Better "practice how to read" program
This uses a GUI instead which will work better for what you're looking for. Increased font size as well.
Adding a second list would involve another GUI asking which list to choose from (look into DropDownList) and selecting your choice. I'm out of time today to help further with this.
Adding a second list would involve another GUI asking which list to choose from (look into DropDownList) and selecting your choice. I'm out of time today to help further with this.
Code: Select all
#SingleInstance force
#NoEnv
WordList := [ "mi", "mimi", "mami" ]
RepeatCheck = 0
WordGui:
{
;Generate random word
Random, WordNum, 1, WordList.MaxIndex()
;Avoid repeating a word 2 times in a row
if (RepeatCheck = WordNum)
Goto, WordGui
RepeatCheck = %WordNum%
;Create GUI
Gui, -MinimizeBox -MaximizeBox
Gui, Font, s30, Times New Roman
Gui, Add, Text,, % WordList[WordNum]
Gui, Font, s9
Gui, Add, Button, W80 Default gButtonOK, OK
Gui, Show,, Speech Test
return
}
ButtonOK:
{
Gui, Destroy
Goto, WordGui
}
GuiClose:
ExitApp
Re: Better "practice how to read" program
Thank you very much !
Rly. Thank you!
I try to add a selection with Dropdown or via Gui Button
wish me luck haha
Rly. Thank you!
I try to add a selection with Dropdown or via Gui Button

Re: Better "practice how to read" program Topic is solved
I created the other GUI for you. This code will let you easily add more list of words.
First, you would created a WordList3/4/5 etc., then add that WordList to the drop down selection.
Gui, Add, DropDownList, vListSelect AltSubmit, WordList1||WordList2|WordList3
Gui, Add, DropDownList, vListSelect AltSubmit, WordList1||WordList2|WordList3|WordList4
etc.
Note that the name in the DropDownList can be changed.
Gui, Add, DropDownList, vListSelect AltSubmit, Mom||Dad|Brother|Sister
You just need to make sure that the position of the option is the same as the number in the WordList variable. (i.e. Dad is position 2, so that correlates to WordList2)
Code: Select all
#SingleInstance force
#NoEnv
;Variable name must be WordListX where X is the next sequential number
WordList1 := [ "mi", "mimi", "mami" ]
WordList2 := [ "pa", "papa", "papi" ]
;Variable to ensure the same word doesn't appear twice
RepeatCheck = 0
;GUI to select which word list to use
Gui, -MinimizeBox -MaximizeBox
Gui, Font, s18, Times New Roman
Gui, Add, Text,, Select WordList
;AltSubmit will return the numerical position selected. X position should correlate to WordListX
Gui, Add, DropDownList, vListSelect AltSubmit, WordList1||WordList2
Gui, Font, s9
Gui, Add, Button, W80 Default gButtonContinue, Continue
Gui, Show,, Choose List
return
ButtonContinue:
{
Gui, Submit, Hide
Goto, WordGui
}
WordGui:
{
Gui, Destroy
;Generate random word
Random, WordNum, 1, WordList%ListSelect%.MaxIndex()
;Avoid repeating a word 2 times in a row
if (RepeatCheck = WordNum)
Goto, WordGui
RepeatCheck = %WordNum%
;Create GUI
Gui, -MinimizeBox -MaximizeBox
Gui, Font, s30, Times New Roman
Gui, Add, Text,, % WordList%ListSelect%[WordNum]
Gui, Font, s9
Gui, Add, Button, W80 Default gButtonOK, OK
Gui, Show,, Speech Test
return
}
ButtonOK:
Goto, WordGui
GuiClose:
ExitApp
Re: Better "practice how to read" program
I was kinda close to your solution. But I totally missed the part to submit my choice. Oh that was bad. Now I know why it won't work. Learned a lot the last 2 days thanks to you.
Thousands thanks. That's what I was looking for !
<3
Thousands thanks. That's what I was looking for !
<3
Who is online
Users browsing this forum: AHKStudent, Bing [Bot], TiGeR and 29 guests