Code: Select all
SetWinDelay, 1
OnMessage("0x0201","Slide")
Gui, Color, 0x000000, 0xFF0092
Gui, Default
Gui, Font, s10 w600 c0x000000, Verdana
GuiAddColorfulText("Bingo","Hibernate","0xFFFFFF")
GuiAddColorfulText("Bingo","For","0xFF0000")
GuiAddColorfulText("Bingo","Demonstration", "0xFF9595")
GuiAddColorfulText("Bingo","Purposes", "0x9595FF")
Gui, Add, Picture, x250 ys gBingo, C:\Users\Exaskryz\Google Drive\Notepads\Notepad.png
Gui, Font, s25 w100 c0x000000, Arial
Gui, Add, Text, x371 y0 gRestore, ►
Gui, Add, Progress, xp-5 yp-5 wp+10 hp+10 c0x555555 background0x000000,100
Gui, Add, Text, xp+5 yp+5 wp-10 hp-10 +BackgroundTrans, ►
Gui, -Caption -Border +AlwaysOnTop +ToolWindow
GoSub, niceify
Gui, Show, % "x" A_ScreenWidth-1 "y0 w491 h" A_ScreenHeight, Slide Pane ; h1052
return
niceify:
longest:=0, texts:=0 ; reset for the loops
Loop ; reposition all my colorfultexts
{
GuiControlGet, pos, pos, % "msctls_progress" 320+A_Index
If (ErrorLevel || posx>50)
Break
If (longest<posw)
longest:=posw
texts++
}
Loop, %texts%
{
GuiControl, Move, % "msctls_progress" 320+A_Index, % "w" longest ; expression syntax for consistency
GuiControl, Move, % "Static" 2*A_Index-1, % "w" longest-6 ; the hidden one with the gLabel
GuiControl, Move, % "Static" 2*A_Index, % "w" longest-6 ; the visible one
GuiControl, +Center, % "Static" 2*A_Index ; centers the text
}
return
Bingo:
MsgBox
GoSub, Restore
return
GuiAddColorfulText(textgLabel,textName,bgcolor){
global
Gui, Add, Text, g%textgLabel%,%textName%
Gui, Add, Progress, xp-3 yp-1 wp+6 hp+2 c%bgcolor% background0x000000,100
Gui, Add, Text, xp+3 yp+1 wp-6 hp-2 +BackgroundTrans, %textName%
return
}
Slide(){
OnMessage("0x0201","Null")
Loop, 41
{
WinGetPos, x,y,,,Slide Pane
WinMove, Slide Pane,, % x-10, y
}
return
}
Null(){
global count
count++
If count>1
{
count:=0
GoSub, Restore
}
return
}
Restore:
WinMove, Slide Pane,, % A_ScreenWidth-1, 0
OnMessage("0x0201","Slide")
return
Any ideas on how to resolve?