Jump to content

Scrolling Credits


Recommended Posts

How would I make upwards scrolling credits loop in a GUI window? I'm trying to make a credits window that is blank to begin with but then the credits scroll upwards, then loop after a pause at the end, but I'm not sure how.

My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.

My Projects

WhyNotWin11
Cisco FinesseGithubIRC UDFWindowEx UDF

 

Link to comment
Share on other sites

Something I had in my function folder...

#include <GUIConstantsEx.au3> ; Created by guinness 2011
#include <WindowsConstants.au3>

Global $__Scrolling_Array[4]

_Main()

Func _Main()
    Local $hGUI, $sTitle
    $sTitle = 'AutoIt v3 is a freeware BASIC-like scripting language designed for automating the Windows GUI and general scripting. It uses a combination of simulated keystrokes, mouse movement and window/control manipulation in order to automate tasks in a way not possible or reliable with other languages (e.g. VBScript and SendKeys). AutoIt is also very small, self-contained and will run on all versions of Windows out-of-the-box with no annoying "runtimes" required!'

    $hGUI = GUICreate("GUI", 400, 250)
    _Scrolling_Create($hGUI, $sTitle, 390, 200, 5, 5)
    GUISetState(@SW_SHOW, $hGUI)

    While 1
        _Scrolling_Move()

        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE
                Exit

        EndSwitch
    WEnd
EndFunc   ;==>_Main

Func _Scrolling_Create($hHandle, $sTitle, $iWidth, $iHeight, $iLeft = 0, $iTop = 0)
    Local $hGUI, $iLabel
    $hGUI = GUICreate("", $iWidth, $iHeight, $iLeft, $iTop, $WS_POPUP, BitOR($WS_EX_TRANSPARENT, $WS_EX_MDICHILD), $hHandle)
    $__Scrolling_Array[0] = $hGUI
    $iLabel = GUICtrlCreateLabel($sTitle, 2, $iHeight - 4, $iWidth - 5, $iHeight - 10)
    $__Scrolling_Array[1] = $iLabel
    $__Scrolling_Array[2] = $iHeight - 10
    $__Scrolling_Array[3] = -$__Scrolling_Array[2]
    GUISetState(@SW_SHOW, $hGUI)
    Return $hGUI
EndFunc   ;==>_Scrolling_Create

Func _Scrolling_Move()
    If $__Scrolling_Array[3] = $__Scrolling_Array[2] Then
        $__Scrolling_Array[3] = -$__Scrolling_Array[2]
    EndIf
    ControlMove($__Scrolling_Array[0], "", $__Scrolling_Array[1], 1, 0 - $__Scrolling_Array[3])
    Sleep(50)
    $__Scrolling_Array[3] += 1
    Return 1
EndFunc   ;==>_Scrolling_Move
Edited by guinness

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

If you are used to working with html, it's easily done writing an html page with a scrolling function in it. Then Create an embedded IE object to display it. It will scroll down at whatever rate you set in the scrolling function which is usually Javascript BTW.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

Check out Melba23's Marquee UDF

2nd time I've forgot about that UDF :mellow:

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

:mellow: That's a lot of code to add, might just stick with non-scrolling credits for now.

My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.

My Projects

WhyNotWin11
Cisco FinesseGithubIRC UDFWindowEx UDF

 

Link to comment
Share on other sites

:mellow: That's a lot of code to add, might just stick with non-scrolling credits for now.

For Melba23's UDF just copy the UDF, open a new .au3 and paste UDF, save it as Marquee.au3. Put Marquee.au3 in your includes folder ProgramFiles\Autoit3\Inculdes\ or if your using beta ProgramFiles\Autoit3\Beta\Includes\.

At the top of your script put #include <Marquee.au3> and then in your script:

_GUICtrlMarquee_SetScroll(0, Default, "up", 1)
_GUICtrlMarquee_SetDisplay(1, Default, Default, 12, "times new roman")
_GUICtrlMarquee_Create("Credits: ",  10, 80, 150, 30) ;<--Change xpos, ypos, xwidth, yheight
Edited by rogue5099
Link to comment
Share on other sites

If I can find the script I used to create scrolling text as I described above. I'll post it.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

Here the scroller I used for Windows Screenshooter:

#include <GuiConstantsEx.au3>
#include <GDIPlus.au3>
#include <Misc.au3>

Opt('MustDeclareVars', 1)

Global $hGUI, $hGraphic, $hBrush, $hFormat, $hFamily, $hFont, $tLayout
Global $width = 800, $height = 600
; Create GUI
$hGUI = GUICreate("GDI+ Vertical Scroller by UEZ", $width, $height)
If @OSBuild < 7600 Then WinSetTrans($hGui,"", 0xFF)
GUISetState()

; Draw a string
_GDIPlus_Startup ()
Global $hGfx = _GDIPlus_GraphicsCreateFromHWND ($hGUI)
$hBrush = _GDIPlus_BrushCreateSolid (0xFF00007F)
Global $hBmp_About = _GDIPlus_BitmapCreateFromGraphics($width, $height, $hGfx)
Global $hCtxt = _GDIPlus_ImageGetGraphicsContext($hBmp_About)
_GDIPlus_GraphicsClear($hCtxt, 0xFFFFFFFF)
_GDIPlus_GraphicsSetSmoothingMode($hCtxt, 2)
DllCall($ghGDIPDll, "uint", "GdipSetTextRenderingHint", "handle", $hCtxt, "int", 4)

;~ Global $tRectF = _GDIPlus_RectFCreate(0, 0, $width / 5, $height / 5)
Global $hFormat = _GDIPlus_StringFormatCreate()
Global $ver = "v0.98 Build 2010-12-09 Beta"

Global $aText[25][9] =  [ _
                                        ["Windows Screenshooter",                   0, 0,   "Comic Sans MS",            48], _
                                        [$ver,                                                          0, 0,   "Comic Sans MS",            24], _
                                        [" ",                                                               0, 0,   "Arial",                            50], _
                                        ["Main Code",                                           0, 0, "Verdana",                        30], _
                                        ["by",                                                          0, 0, "Times New Roman",    40], _
                                        ["UEZ",                                                         0, 0, "Arial Black",              150], _
                                        [" ",                                                               0, 0,   "Arial",                            20], _
                                        ["Additional Code by:",                         0, 0, "Georgia",                        24], _
                                        ["(Alphabetical Order)",                            0, 0,   "Tahoma",                       14], _
                                        [" ",                                                               0, 0,   "Arial",                            20], _
                                        ["Authenticity",                                            0, 0, "Arial",                          32], _
                                        ["eukalyptus",                                          0, 0, "Arial",                          32], _
                                        ["Montfrooij",                                          0, 0, "Arial",                          32], _
                                        ["taietel",                                                 0, 0, "Arial",                          32], _
                                        ["Ward",                                                        0, 0, "Arial",                          32], _
                                        ["Yashied",                                                 0, 0,   "Arial",                            32], _
                                        [" ",                                                               0, 0,   "Arial",                          100], _
                                        ["Thanks to:",                                          0, 0, "Tunga",                      40], _
                                        [" ",                                                               0, 0,   "Arial",                            20], _
                                        ["Firelight Technologies for fmod.dll", 0, 0, "Palatino Linotype",      32], _
                                        [" ",                                                               0, 0,   "Arial",                            32], _
                                        ["Anne Haessig for the chip tune:",     0, 0, "MV Boli",                        32], _
                                        ["DaZzLed",                                             0, 0, "Impact",                     32], _
                                        [" ",                                                               0, 0,   "Arial",                          120], _
                                        ["Press ESC to quit",                                   0, 0, "Latha",                          30]]

Global $tLayout = _GDIPlus_RectFCreate (0, 0, 0, 0), $aInfo
Global $y = $height, $dy = 0, $sy = 0
For $z = 0 To UBound($aText) - 1
    $aText[$z][1] = _GDIPlus_FontFamilyCreate($aText[$z][3]) ;$hFamily
    $aText[$z][2] = _GDIPlus_FontCreate($aText[$z][1], $aText[$z][4]) ;$hFont
    $aInfo = _GDIPlus_GraphicsMeasureString($hGfx, $aText[$z][0], $aText[$z][2], $tLayout, $hFormat)
    $aText[$z][5] = Floor(DllStructGetData($aInfo[0], "Width"))
    $aText[$z][6] = Floor(DllStructGetData($aInfo[0], "Height"))
    $aText[$z][7] = Floor($width / 2 - ($aText[$z][5] / 2))
    $aText[$z][8] = Floor($y + $dy + $sy)
    $sy +=  $aText[$z][6]
Next

Global $speed = 1
Global $dll = DllOpen("user32.dll")
While Not _IsPressed("1B", $dll) * Sleep(10)
    _GDIPlus_GraphicsClear($hCtxt, 0xFFFFFFFF)
    For $z = 0 To UBound($aText) - 1
        If $aText[$z][8] < $height And $aText[$z][8] > -$aText[$z][6] Then
            $tLayout = _GDIPlus_RectFCreate ($aText[$z][7], $aText[$z][8], 0, 0)
            _GDIPlus_GraphicsDrawStringEx($hCtxt, $aText[$z][0], $aText[$z][2], $tLayout, $hFormat, $hBrush)
        EndIf
        $aText[$z][8] -= $speed
    Next
    _GDIPlus_GraphicsDrawImageRect($hGfx, $hBmp_About, 0, 0, $width, $height)
    If $aText[UBound($aText) - 1][8] < -$aText[UBound($aText) - 1][6] * 2.5 Then ExitLoop
WEnd
DllClose($dll)
For $z = 0 To UBound($aText) - 1
    _GDIPlus_FontDispose($aText[$z][2])
    _GDIPlus_FontFamilyDispose($aText[$z][1])
Next
$tLayout = ""
_GDIPlus_StringFormatDispose ($hFormat)
_GDIPlus_BrushDispose ($hBrush)
_GDIPlus_BitmapDispose($hBmp_About)
_GDIPlus_GraphicsDispose($hCtxt)
_GDIPlus_GraphicsDispose($hGfx)
GUIDelete($hGUI)
Exit

Have fun!

Br,

UEZ

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

For Melba23's UDF just copy the UDF, open a new .au3 and paste UDF, save it as Marquee.au3. Put Marquee.au3 in your includes folder ProgramFiles\Autoit3\Inculdes\ or if your using beta ProgramFiles\Autoit3\Beta\Includes\.

At the top of your script put #include <Marquee.au3>:

I'm too lazy. XD, however I will keep the UDF for later.

My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.

My Projects

WhyNotWin11
Cisco FinesseGithubIRC UDFWindowEx UDF

 

Link to comment
Share on other sites

I'm too lazy.

To learn? The examples provided above are relatively easy to implement. Edited by guinness

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

Playing around with the Melba23's, I was trying to center the text into the window and not being able to.

I have tried editing his UDF in the create:

Is this not right? I know in html you use <center> to center the text but its not doing it??

Fixed it:

.write('<center>')

.write($sText)

.write('</center>')

Better solution is in Text field just do this:

"<center>Credits:</center>"

Now it centers text!!!

Edited by rogue5099
Link to comment
Share on other sites

With $oShell.document
        .write('<style>marquee{cursor: default}></style>')
        .write('<body onselectstart="return false" oncontextmenu="return false" onclick="return false" ondragstart="return false" ondragover="return false">')
        .writeln('<marquee width=100% height=100%')
        .writeln("loop=" & $iMarquee_Loop)
        .writeln("behavior=" & $sMarquee_Move)
        .writeln("direction=" & $sMarquee_Direction)
        .writeln("scrollamount=" & $iMarquee_Scroll)
        .writeln("scrolldelay=" & $iMarquee_Delay)
        .write(">")
        .write('<center>')
        .write($sText)
        .write('</center>')
        .body.title = $sTipText
        .body.topmargin = 0
        .body.leftmargin = 0
        .body.scroll = "no"
        .body.style.color = $vMarquee_TxtCol
        .body.bgcolor = $sMarquee_BkCol
        .body.style.borderWidth = $iMarquee_Border
        .body.style.fontFamily = $sMarquee_FontFamily
        .body.style.fontSize = $iMarquee_FontSize
    EndWith

Also Melba's version is missing the closing tag for Marquee ... .write('</marquee>')!

Edited by guinness

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

Also Melba's version is missing the closing tag for Marquee ... .write('</marquee>')!

Good catch!

#include <Marquee.au3>
$Credits = "<center>Credits:<br>Melba23 for Marquee<br>Rogue5099 for pointing to UDF<br>AutoIt for endless possibilities</center>"
GUICreate("Marquee Example", 320, 220)
_GUICtrlMarquee_SetScroll(0, Default, "up", 3)
_GUICtrlMarquee_SetDisplay(1, Default, Default, 12, "times new roman")
_GUICtrlMarquee_Create($Credits, 10, 10, 300, 200) ;<--Change xpos, ypos, xwidth, yheight
GUISetState()

While 1
    If GUIGetMsg() = -3 Then Exit
WEnd
Link to comment
Share on other sites

rogue5099 you know I added the center tags to your original post you edited & I'm a little confused as to why writeln is used and not write, since ideally <marquee ... should be on the same line.

Ref: http://www.w3schools.com/jsref/met_doc_writeln.asp

Edit: Just tried messing around with & how Melba23 did it, suppresses object errors. :mellow:

Edit 2: It's writeLN not writeIN :)

Edited by guinness

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

guinness:

I edited right after I posted cause I figured it out.Then I saw you added write(center) but I didnt want to edit the UDF to always be center. So if you just add <center></center> to text it centers it without effecting other possible marquees. I have never messed with object and writing so I was trying write and writeln just following what he already made. Yes it doesn't make sense to have a new line since it should be in the same line.

RE: To your Edit: I guess that's why he did it lol

Edited by rogue5099
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...