Rad Posted October 28, 2006 Posted October 28, 2006 I made a pretty cheesy way to make the text scroll across a label, one letter at a time... it looks really blocky though, I was wondering if anyone's ever thought of a way or knows a way to make the text move smoothly across... If you open WMP and use the compact skin (the blue/silver with black center), the title of a song scrolls across it smoothly. I've also seen it done with a few cdkey generators, but I dont know how. Just wondering if its possible
Moderators SmOke_N Posted October 28, 2006 Moderators Posted October 28, 2006 (edited) Quick and dirty:AdlibEnable('_MoveMarquee', 100) Global $mygui = GUICreate('my gui', 200, 100) Global $myl = GUICtrlCreateLabel('Some Text To Show', 0, 10, 150, 20) GUISetState() While GUIGetMsg() <> -3 WEnd Func _MoveMarquee() Local $aCpos = ControlGetPos($mygui, '', $myl) If $aCpos[0] >= 200 Then $aCpos[0] = 0 ControlMove($mygui, '', $myl, $aCpos[0] + 10, $aCpos[1]) EndFuncoÝ÷ ØGb´KÞxz¶®¶sdFÆ$Væ&ÆRb33µôÖ÷fTÖ'VVRb33²Â ¤vÆö&Âb33c¶×wVÒuT7&VFRb33¶×wVb33²Â#¤vÆö&Âb33c¶×ÂÒuT7G&Ä7&VFTÆ&VÂb33µ6öÖRFWBFò6÷rb33²ÂÂÂSÂ#¤uT6WE7FFR¥vÆRuTvWD×6rfÇC²fwC²Ó0¥tVæ@ ¤gVæ2ôÖ÷fTÖ'VVR Æö6Âb33c¶7÷2Ò6öçG&öÄvWE÷2b33c¶×wVÂb33²b33²Âb33c¶× bb33c¶7÷5³ÒfwC³Ò#FVâb33c¶7÷5³ÒÒ 6öçG&öÄÖ÷fRb33c¶×wVÂb33²b33²Âb33c¶×ÂÂb33c¶7÷5³Ò²Âb33c¶7÷5³Ò¤VæDgVæ0 Edited October 28, 2006 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
Rad Posted October 28, 2006 Author Posted October 28, 2006 (edited) Is there any way to like... mount this as a background, so I can put labels over it? And picturesBecause heres my program, and the top left one that says "ish - W i s h m a s t e r" is whats scrolling. Im actually scrolling the text, not the control, thoughI really wish there were control layers Edited October 28, 2006 by Rad
Moderators SmOke_N Posted October 28, 2006 Moderators Posted October 28, 2006 Is there any way to like... mount this as a background, so I can put labels over it? And picturesBecause heres my program, and the top left one that says "ish - W i s h m a s t e r" is whats scrolling. Im actually scrolling the text, not the control, thoughI really wish there were control layersMake it a control, and disable the control behind it. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
Moderators SmOke_N Posted October 28, 2006 Moderators Posted October 28, 2006 This is close to what you are saying "I think"AdlibEnable('_MoveMarquee', 10) Global $mygui = GUICreate('my gui', 200, 100) $myI = GUICtrlCreateInput('', 0, 10, 200, 17) GUICtrlSendMsg($myI, 0xCF, True, 0) GUICtrlSetBkColor($myI, 0xFFFFFF) GUICtrlSetState($myI, 128) Global $myl = GUICtrlCreateLabel('Some Text To Show', 0, 10, 150, 17) GUICtrlSetBkColor($myl, -2) GUISetState() While GUIGetMsg() <> -3 WEnd Func _MoveMarquee() Local $aCpos = ControlGetPos($mygui, '', $myl) If $aCpos[0] >= 200 Then $aCpos[0] = 0 ControlMove($mygui, '', $myl, $aCpos[0] + 1, $aCpos[1]) EndFunc Exit Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
GaryFrost Posted October 28, 2006 Posted October 28, 2006 might give you some ideashttp://www.autoitscript.com/forum/index.ph...=14409&st=0 SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
Rad Posted October 28, 2006 Author Posted October 28, 2006 I looked at that, thats basically what I did except i made it scroll from left to right and back again. The examples with that are only "move in from left/right" "move out from left/right". Plus, it writes itself in... In mine it just changes the text to appear like its moving Example: Nightwish - Wishmaster ightwish - Wishmaster N ghtwish - Wishmaster Ni ... shmaster Nightwish - Wi etc. Here ill attach it for you so you can look, the source is really long from all of the button codes, and it probrably wouldnt make sense unless you compare it to my UDF's in Rad.au3 - i suggest you extract all files to a folder, and just run the .exe to see what I mean, it will be obvious
Bert Posted December 5, 2006 Posted December 5, 2006 (edited) I was looking for something like this, and this will work pretty well. I do have one question. How do you make it so it looks like it starts compleatly from the left showing the end of the statement first, then the rest of the string. What I mean is currently the scroll starts by showing the entire string. In other words, how do you get it to enter stage left, exit stage right? Edit: I figured it out: AdlibEnable('_MoveMarquee', 10) $size = 300 $text = 150 Global $mygui = GUICreate('my gui', $size, 70) Global $myl = GUICtrlCreateLabel('Some Text To Show', 0, 10, $text, 20) GUISetState() While GUIGetMsg() <> -3 WEnd Func _MoveMarquee() Local $aCpos = ControlGetPos($mygui, '', $myl) If $aCpos[0] >= $size Then $aCpos[0] = -$text ControlMove($mygui, '', $myl, $aCpos[0] + 1, $aCpos[1]) EndFunc Edited December 5, 2006 by Volly The Vollatran project My blog: http://www.vollysinterestingshit.com/
ChrisL Posted December 23, 2006 Posted December 23, 2006 I was looking for something like this, and this will work pretty well. I do have one question. How do you make it so it looks like it starts compleatly from the left showing the end of the statement first, then the rest of the string. What I mean is currently the scroll starts by showing the entire string. In other words, how do you get it to enter stage left, exit stage right? Edit: I figured it out: AdlibEnable('_MoveMarquee', 10) $size = 300 $text = 150 Global $mygui = GUICreate('my gui', $size, 70) Global $myl = GUICtrlCreateLabel('Some Text To Show', 0, 10, $text, 20) GUISetState() While GUIGetMsg() <> -3 WEnd Func _MoveMarquee() Local $aCpos = ControlGetPos($mygui, '', $myl) If $aCpos[0] >= $size Then $aCpos[0] = -$text ControlMove($mygui, '', $myl, $aCpos[0] + 1, $aCpos[1]) EndFunc If You create your label at -$text rather than 0 it looks better to start with. $size = 300 $text = 150 Global $mygui = GUICreate('my gui', $size, 70) Global $myl = GUICtrlCreateLabel('Some Text To Show', -$text, 10, $text, 20) GUISetState() AdlibEnable('_MoveMarquee', 10) While GUIGetMsg() <> -3 WEnd Func _MoveMarquee() Local $aCpos = ControlGetPos($mygui, '', $myl) If $aCpos[0] >= $size Then $aCpos[0] = -$text ControlMove($mygui, '', $myl, $aCpos[0] + 1, $aCpos[1]) EndFunc [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire
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