I want to do a game for my children! They are learning to read.
I want show some cards with letter on the screen. The program will talk, asking them press the correct letter.
In the cards, it must appear a drawing.
What do you advise me to use? Can they put a background image to buttons?
Thanks in advance!
Button with image?
Button with image?
Everything is possible!
- Blackholyman
- Posts: 1293
- Joined: 29 Sep 2013, 22:57
- Location: Denmark
- Contact:
Re: Button with image?
You Can use an image control with a g-label
Courses on AutoHotkey
My Autohotkey Blog
- PuzzledGreatly
- Posts: 1320
- Joined: 29 Sep 2013, 22:18
Re: Button with image?
This is the kind of thing I am working on as well. Are you going to use a phonetic approach - eg c and k have the same sound? In my experience that is more helpful for reading. Instead of a picture you can also use text with a g-label. The problem with text is that fonts are different sizes on different monitors. I wish I knew a solution to that.
Re: Button with image?
At this moment I only need that my children start to recognize the letters.
I want to use simple sounds for each letter.
I'll comment.
Thanks!
I want to use simple sounds for each letter.
I'll comment.
Thanks!
Everything is possible!
Re: Button with image?
OffTopic:
Spoiler
Last edited by kidbit on 28 Oct 2013, 11:51, edited 1 time in total.
question := (2b) || !(2b) © Shakespeare.
Re: Button with image?
I'm sorry but I get an error with your script
I have any jpg files and I need to place them in a certain position. What is the correct sintaxis for Gui,Add,Picture?
Thanks in advance!
Any help with Gui,Add Picture ?C:\Archivos de programa\Sublime Text 3\Avis_Sublime4Autohotkey\temp\default9.ahk (22) : ==> This parameter contains a variable name missing its ending percent sign.
Specifically: %Name%, % "how much will this be:
" operand1 operator1 operand2 operator2 operand3 operator3 operand4 operator4 operand5 operator5 operand6 operator6 operand7 " = ?"
[Finished in 0.1s]
I have any jpg files and I need to place them in a certain position. What is the correct sintaxis for Gui,Add,Picture?
Thanks in advance!
Everything is possible!
Re: Button with image?
empadopo, I edited the code. That line should be InputBox, answer, Task [%A_Index%/%numberOfTasks%], % Name ", how much will this be:`n" operand1 operator1 operand2 operator2 operand3 operator3 operand4 operator4 operand5 operator5 operand6 operator6 operand7 " = ?"
question := (2b) || !(2b) © Shakespeare.
Re: Button with image?
GUI, Add, Picture, xn yn glabel, path to pictureempardopo wrote:Any help with Gui,Add Picture ?
I have any jpg files and I need to place them in a certain position. What is the correct sintaxis for Gui,Add,Picture?
Thanks in advance!
Replace the "n"'s with the coordinates and label with the name of the label you want to jump to, if the image gets clicked.
"Nothing is quieter than a loaded gun." - Heinrich Heine
Re: Button with image?
kidbit, now it works fine. I will study the code.
I have this
How can I lay the letter B on the right of the letter A?
My code is this:
Thanks!
I have this
How can I lay the letter B on the right of the letter A?
My code is this:
Code: Select all
Gui, Show, w800 h600
Gui, Add, Picture, 0 0 w100 h-1 gletraA, C:\Documents and Settings\Administrador\Escritorio\Letras\A.png-1.jpg
Gui, Add, Picture, xm w100 h-1 gletraA, C:\Documents and Settings\Administrador\Escritorio\Letras\B.png-1.jpg
Gui, Add, Picture, w100 h-1 gletraA, C:\Documents and Settings\Administrador\Escritorio\Letras\C.png-1.jpg
Gui, Add, Picture, w100 h-1 gletraA, C:\Documents and Settings\Administrador\Escritorio\Letras\D.png-1.jpg
return
Everything is possible!
Re: Button with image?
WoW!!! Thanks very much!Alibaba wrote:GUI, Add, Picture, xn yn glabel, path to pictureempardopo wrote:Any help with Gui,Add Picture ?
I have any jpg files and I need to place them in a certain position. What is the correct sintaxis for Gui,Add,Picture?
Thanks in advance!
Replace the "n"'s with the coordinates and label with the name of the label you want to jump to, if the image gets clicked.
Now, It works fine
Thanks!
Everything is possible!
Re: Button with image?
or you could use the relative coordinates:
Code: Select all
Gui, Add, Picture, 0 0 w100 h-1 gletraA, C:\Documents and Settings\Administrador\Escritorio\Letras\A.png-1.jpg
Gui, Add, Picture, x+1 w100 h-1 gletraA, C:\Documents and Settings\Administrador\Escritorio\Letras\B.png-1.jpg
Gui, Add, Picture, x+1 w100 h-1 gletraA, C:\Documents and Settings\Administrador\Escritorio\Letras\C.png-1.jpg
Gui, Add, Picture, x+1 w100 h-1 gletraA, C:\Documents and Settings\Administrador\Escritorio\Letras\D.png-1.jpg
question := (2b) || !(2b) © Shakespeare.
Re: Button with image?
Yes. In case that all pictures have the same size, this is the better way.kidbit wrote:or you could use the relative coordinates
To jump to the "next line" with relative coords, simply reset x to 0 and use y+1.
"Nothing is quieter than a loaded gun." - Heinrich Heine
- PuzzledGreatly
- Posts: 1320
- Joined: 29 Sep 2013, 22:18
Re: Button with image?
Your graphics look nice but for learning to read (and write) lower case is more useful than upper case. Having said that, one method is to use the upper case for the letter names (as in the ABC song) and the lower case for the sounds. Then introduce the idea of Letter A says "a", letter "B" says "b" etc. However, I prefer introducing the lower case first with the letter sounds (phonemes) and only bother with the upper case once reading has started. I work with children learning English as a second language. In my experience those who have the ABC ingrained have a much harder time learning to read than those who don't. Eg the word cat is not pronounced SEE-AY-TEE. Check out Synthetic phonics at Wikipedia .
Back to AHK - here is a rough function I've been using to centre a graphic after it has been touched:
I use GuiControl to hide the other images on the screen. Some movement makes an activity more attractive to children.
Back to AHK - here is a rough function I've been using to centre a graphic after it has been touched:
Code: Select all
MoveToCentre(img, siz, speed, GN=1)
{
;img = variable associated with the control to be moved
;siz - final size eg 2 will double the size, 0.5 will halve it
;speed - the larger the number the slower the movement
;GN = the Gui Number for cases with more than one Gui
Gui, %GN%:default
GuiControlGet, %img%, Pos
sizW := %img%W * siz
sizH := %img%H * siz
offX := (A_ScreenWidth/2) - (sizW/2)
offY := (A_ScreenHeight/2) - (sizH/2)
shiftW := (sizW - %img%W) / speed
shiftH := (sizH - %img%H) / speed
speedX := (offX - %img%X) / speed
speedY := (offY - %img%Y) / speed
moveX := %img%X + speedX
moveY := %img%Y + speedY
sizeW := %img%W + shiftW
sizeH := %img%H + shiftH
loopN := speed - 1
loop, %loopN%
{
GuiControl, %GN%:movedraw, %img%, x%moveX% y%moveY% w%sizeW% h%sizeH%
moveX += speedX
moveY += speedY
sizeW += shiftW
sizeH += shiftH
sleep 10
}
GuiControl, %GN%:movedraw, %img%, x%offX% y%offY% w%sizW% h%sizH%
}
Who is online
Users browsing this forum: AlFlo, Bing [Bot] and 145 guests