I found a Credits window in
Compile_AHK II and in this post
Credits Gui. Because I liked it and found it useful I made a function out of it:
To use it, make a Gui and add
credits afterwards.
credits(WinTitel,Yend=0,repeat=1,GuiID=1)
WinTitel: Name of the Credits window
Yend: an Offset for the animation
Repeat: nothing more to say
GuiId: Windows number
Code:
Gui, Add, Button, gAbout ,show Credit
Gui, Show, y10 w100 h50,Main
Return
about:
titel= Credits:
TestText =
(LTrim
Producer:`t`tMom`n
AssistantProducer:`tDad`n
Sound:`t`t`tBaby`n
This will go on for a while.
Believe me.
It's not worth reading on.
C'mon - quit now.
Close the gui`n
Hello?`n`n
It's useless reading on.`n`n
Oh look how nice it scrolls
So you wanted it.
I'll close the gui for you.`n`n`n`n
BYE
)
Gui,55: +ToolWindow +AlwaysOnTop
Gui,55: Margin, 0, 0
Gui,55: Add, Picture, vIcon1 x10 h16 w16 Icon44, shell32.dll
Gui,55: Add, Text, vText1 yp+0 x30, Chris
Gui,55: Add, Picture, vIcon x10 h16 w16 Icon13, shell32.dll
Gui,55: Add, Text, vText2 yp+0 x30, TiTan
Gui,55: Add, Picture, vIcon3 x10 h16 w16 Icon95, shell32.dll
Gui,55: Add, Text, vText3 yp+0 x30, Jane Doe
Gui,55: Add, Text, vText4 yp+30 x10, %TestText%
Gui,55: Add, Button, g55GuiClose x250,test
Gui,55: Add, Text, vText5 yp+0 x10, made by haichen
Gui,55: Add, Text, vText6 x10, 2008
Gui,55: Show, h255 ,%titel%
credits(titel,70,1,55)
Return
credits(WinTitel,Yend=0,repeat=1,GuiID=1){
global
Gui, Submit, NoHide
test := WinExist(WinTitel)
WinGetPos,,,WinW,WinH,%WinTitel%
WinGet, ActiveControlList, ControlList,%WinTitel%
ctr=0
Loop, Parse, ActiveControlList, `n,%a_Space%
{
ctr++
GuiControlGet GC%a_index%Pos, %GuiID%:Pos,%A_LoopField%
If (GC%a_index%PosY<>"")and(GC%a_index%PosY>0)
LastPos := GC%a_index%PosY
If (A_LoopField="autoHotkeyGui1") or (A_LoopField="ReBarWindow321")
GC%a_index%PosY = 0
tGC%a_index%PosY := GC%a_index%PosY
}
IfWinNotExist ahk_id %test%
Return
Loop,%Repeat%
{
sleep,2000
Loop,% LastPos -Yend
{
i=0
Loop, Parse, ActiveControlList, `n
{
i++
GC%i%PosY--
PosY:= GC%i%PosY
GuiControl %GuiID%:Move ,%A_LoopField%, y%PosY%
}
Sleep 50
IfWinNotExist ahk_id %test%
Return
}
Sleep 15000
Loop, %ctr%
GC%a_index%PosY:= tGC%a_index%PosY
}
Gui,%GuiID%:Destroy
Return
}
55GuiClose:
Gui, 55:Destroy
Return
GuiEscape:
GuiClose:
ExitApp
