Tipulatoid Posted November 8, 2008 Share Posted November 8, 2008 (edited) Hello Trying to make moving text (credits) in "About" dialogue. What I've done for now: #include <GuiConstantsEx.au3> #include <StaticConstants.au3> #Include <Array.au3> $top = 600 GUICreate("Credits", 300, $top) Local $ThanksgivingStrings[4] = ["I want to express special gratitude to:", "AutoIt Team", "AutoIt Community", "... and many other good people"] Local $ThanksgivingLabel = GUICtrlCreateLabel (_ArrayToString ($ThanksgivingStrings, @CRLF, 0, UBound ($ThanksgivingStrings)-1), 150, $top, 200, 14*UBound ($ThanksgivingStrings)-1, $SS_CENTER) Local $LabelBig = GUICtrlCreateLabel ("", 25, 100, 250, 400, $SS_BLACKFRAME) GUISetState () While 1 Sleep (20) $top -=2 GUICtrlSetPos ($ThanksgivingLabel, 50, $top) If $top < -150 Then $top = 600 ; ConsoleWrite ($top & @CRLF) Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd I need moving text to be visible only within the scope of $LabelBig. But the fluidity of the moving strings appearing/disappearing must be the same as is. Can you help with this? Thanks Edited November 9, 2008 by Tipulatoid Link to comment Share on other sites More sharing options...
ResNullius Posted November 9, 2008 Share Posted November 9, 2008 Might want to check out this post and the one immediately after it for some ideas:http://www.autoitscript.com/forum/index.ph...st&p=409450 Link to comment Share on other sites More sharing options...
Valuater Posted November 9, 2008 Share Posted November 9, 2008 TextEffects.au3 by peethebee... best I've seenhttp://www.autoitscript.com/forum/index.ph...409&hl=textcheck out the demo8) Link to comment Share on other sites More sharing options...
Tipulatoid Posted November 9, 2008 Author Share Posted November 9, 2008 ResNullius, Valuater Wow. Your links guide to very impressive demos! Thanks a lot! Link to comment Share on other sites More sharing options...
Tipulatoid Posted November 9, 2008 Author Share Posted November 9, 2008 Finally solved that way: expandcollapse popup#include <GuiConstantsEx.au3> #include <StaticConstants.au3> #include <EditConstants.au3> #include <WindowsConstants.au3> $top = 600 $GUI = GUICreate("Credits", 300, $top) ; GUISetBkColor(0xFFFFFF) Local $ThanksgivingStrings[4] = ["I want to express special gratitude to:", "AutoIt Team", "AutoIt Community", "... and many other good people"] ; Local $LabelBig = GUICtrlCreateLabel ("", 25, 100, 250, 420, $SS_BLACKFRAME) Local $ThanksgivingLabel[UBound ($ThanksgivingStrings)] $sTransHeight = 5 $sTransValue = 30 For $x = 0 to $sTransValue $stemp = GUICreate("",250, $sTransHeight, 25, $sTransHeight * $x + 100 ,BitOR($WS_POPUP,$WS_CHILD),$WS_EX_MDICHILD,$GUI) GUISetState() WinSetTrans($stemp,"",(255/$sTransValue)*(-1*($x-$sTransValue))) Next For $x = 0 to $sTransValue $stemp = GUICreate("",250, $sTransHeight, 25, 365 - ($sTransHeight * $x - 150) ,BitOR($WS_POPUP,$WS_CHILD),$WS_EX_MDICHILD,$GUI) GUISetState() WinSetTrans($stemp,"",(255/$sTransValue)*(-1*($x-$sTransValue))) Next GUISetState (@SW_SHOW,$GUI) $sScroll = 80 $LabelHeight = 18 While 1 Sleep (5) $sScroll +=1 For $f=0 to UBound ($ThanksgivingLabel) - 1 If $sScroll = 100 + $LabelHeight*$f Then $ThanksgivingLabel[$f] = GUICtrlCreateLabel($ThanksgivingStrings[$f],50, $top - $sScroll,200,$LabelHeight,$ES_CENTER) Next For $w = 0 to UBound ($ThanksgivingLabel) - 1 GUICtrlSetPos ($ThanksgivingLabel[$w], 50, $top - $sScroll + $w*$LabelHeight) Next For $t=0 to UBound ($ThanksgivingLabel) - 1 If $sScroll = 500 + $LabelHeight*$t Then GUICtrlDelete ($ThanksgivingLabel[$t]) EndIf Next If $sScroll > $top Then $sScroll = 80 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now