
The Game:
The GUI contains 36 pairs of identical Dingbats. You have to flip open each of them and find the pairs. Consecutive flips on an identical pair earns you them. The catch: No more than two Dingbats will be open at a given time. You have to fully rely on your memory and concentration to play this Game. To finish the game, you will have to find all the 36 pairs.
[*:3qvdil97]Some of the Dingbats might look similar ( especially Monalisa ).
[*:3qvdil97]The Game Timer stops if the GUI is not active ( or is Minimised ).
Credit: It was adapted from an example given in the AHK Documentation : FormatTime
[*:3qvdil97]F2 Reloads the Script.
Gui, +AlwaysOnTop Gui,Font,s28, Webdings Loop 36 Ix:=A_Index, Ch.=Chr(158+Ix) "|" Chr(158+Ix) ((Ix<36) ? "|" : "") Sort,Ch,D| Random X:=10, Y:=10, R:=1, C:=1, Ix:=1 Loop,Parse,Ch,| { Gui,Add,Button,x%X% y%Y% w46 h46 vB%Ix% gMainProcedure X:=X+50, C:=C+1, Ix:=Ix+1 If (C>9) R:=R+1, C:=1, Y:=Y+50, X:=10 } Gui,Font,S8 Bold,Tahoma Gui,Margin,10,10 Gui,Add,StatusBar e:=SB_SetParts(75,75,250), CL:=0, FL:=0, A_Time:=SubStr(A_Now,1,8) Gui,Show,,Dingbat Flipper 45L SetTimer,GameTimer,1000 Return ; [ End of Auto-Execute Section ] F2::ReLoad MainProcedure: ; [ Main Procedure ] iNo:=Substr(A_GuiControl,2,2) If (iNo!=S1 and iNo!=S2 and AR!=1) { e:=GuiC(N,"B" iNo,GetF(Ch,iNo)), S0:=S1, S1:=S2, S2:=iNo, e:=GuiC(N,"B" S0), AR:=1 If ( GetF(Ch,S1) [color=red]==[/color] GetF(Ch,S2) ) ; [color=red]== is used for case sensitive matching[/color] e:=GuiC("Disable","B" S1), e:=GuiC("Disable","B" S2), S1:=0, S2:=0, FL:=FL+1 CL:=CL+1, AR:=0, SB_SetText("`tClicks: " CL,1), SB_SetText("`tFlips: " FL "/36",2) IfEqual,FL,36, Gui,Show,,GAME OVER! Press <F2> to play again } Return GameTimer: ; [ Game Timer ] If (WinActive("Dingbat Flipper 45L") And CL>0) { A_Time+=1,S FormatTime,MMSS,%A_Time%,mm:ss SB_SetText("`t" MMSS,4) } Return GetF(Str="",Fld=1) { ; GetField() Loop,Parse,Str,| IfEqual,A_Index,%Fld%, Return,A_LoopField } GuiC(P1="",P2="",P3="") { ; GuiControl() GuiControl,%P1%, %P2%,%P3% } GuiClose: ExitApp
If you have a Memory of GoldFish ( like me! ), you may try Auto-Solver which I wrote for debugging this game.
Thank you for trying this Game.
