Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

_ScrollingCredits() - Create a scrolling credits control.


  • Please log in to reply
16 replies to this topic

#1 guinness

guinness

    all-consuming swarm in inconspicuous disguise

  • Developers
  • 17,325 posts

Posted 14 December 2011 - 08:03 PM

I created this 'Scrolling Credits' function after I came across Melba's Marquee UDF, it gave me the idea of how to effectively embed HTML inside a control created using GUICtrlCreateObj.

Note: I've had this function laying around for about 4 months and felt it could be useful for someone. Any comments or suggestions then please post below.

The forum sometimes will remove a backslash, so I've decided to attach the file instead.
Download: Attached File  _ScrollingCredits.au3   4.43KB   373 downloads

Edited by guinness, 07 March 2013 - 02:13 PM.

Example List: _AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_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()CodingDirToHTML5FileInstallrGeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()LockFile()Mapping CtrlIDsParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...
Updated: 30/07/2014








#2 Emiel Wieldraaijer

Emiel Wieldraaijer

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 706 posts

Posted 14 December 2011 - 09:01 PM

Nice

I use an editcontrol in combination with _GUICtrlEdit_Scroll

For example, where 35 in the amount for scolling

Func _EditScroll() If TimerDiff($Timer_1) > 1000 Then   $Count = $Count + 1   If $Count < 35 Then    _GUICtrlEdit_Scroll($Edit, $SB_LINEDOWN)    $Timer_1 = TimerInit()   Else    _GUICtrlEdit_LineScroll($Edit], 0, -35)    $Count = 0    $Timer_1 = TimerInit()   EndIf EndIf EndFunc   ;==>_EditScroll

Edited by Emiel Wieldraaijer, 14 December 2011 - 09:03 PM.

Best regards,Emiel WieldraaijerPosted Image

#3 guinness

guinness

    all-consuming swarm in inconspicuous disguise

  • Developers
  • 17,325 posts

Posted 14 December 2011 - 09:05 PM

OK, it's a different approach. Thanks for sharing.

Example List: _AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_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()CodingDirToHTML5FileInstallrGeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()LockFile()Mapping CtrlIDsParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...
Updated: 30/07/2014


#4 supersonic

supersonic

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 470 posts

Posted 15 December 2011 - 07:56 AM

guinness,

good work!

Is it possible to make the background transparent (control overlapping)?

Greets,
-supersonic.

#5 guinness

guinness

    all-consuming swarm in inconspicuous disguise

  • Developers
  • 17,325 posts

Posted 15 December 2011 - 12:35 PM

supersonic,

Having spent the best part of 30 minutes thinking of an easy solution to go about this I couldn't find one. Therefore if someone else knows how then I would be interested to know the best approach. Sorry about that.

Edited by guinness, 15 December 2011 - 12:36 PM.

Example List: _AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_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()CodingDirToHTML5FileInstallrGeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()LockFile()Mapping CtrlIDsParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...
Updated: 30/07/2014


#6 Lakes

Lakes

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 1,037 posts

Posted 15 December 2011 - 02:20 PM

Donno if this helps or not, not related to controls, but may give you some ideas.
AutoIt         
#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GUIConstants.au3> #include <GDIPlus.au3> #include <String.au3> #include <GuiMenu.au3> #include <Misc.au3> Global Const $width = 640 Global Const $height = 480 Global $graphics, $backbuffer, $bitmap, $Pen Global $brush_color, $hFormat, $tLayout Global $ScreenDc, $dc, $tSize, $pSize, $tSource, $pSource, $tBlend, $pBlend, $tPoint, $pPoint, $gdibitmap Global $title = "From GDI+ Code by : UEZ!" Global $hGUI, $hBrush Global $iX = 0, $iY = 0, $Col, $hPen, $iWidth = 100, $iHeight =100 Global $sc_hBrush, $sc_hFormat, $sc_hFamily, $sc_hFont, $sc_text_color, $text_scroller, $sc_tLayout, $sc_pen, $sc_brush Global $letter_distance, $x, $y, $lenght, $end, $scroller_length, $sc_k Global $pColor = 0xFF0000F0 Global $dot_k = $Width Global $Trans, $Size Global Const $sc_font_size = 48 $sc_text = "#*** |||| __Transparent Text Srcoller with Clock__ |||| ***#" Opt("GUIOnEventMode", 1) Opt("MouseCoordMode" ,0) $GUI= GUICreate($title, $width, $height, -1, -1, 0, $WS_EX_LAYERED + $WS_EX_TOPMOST) ;Window Must be Layered for Transparency GUISetOnEvent($GUI_EVENT_CLOSE, "Close") _GDIPlus_Startup() $graphics = _GDIPlus_GraphicsCreateFromHWND($GUI) $bitmap = _GDIPlus_BitmapCreateFromGraphics($width, $height, $graphics) $backbuffer = _GDIPlus_ImageGetGraphicsContext($bitmap) _GDIPlus_GraphicsSetSmoothingMode($backbuffer, 2) $sc_hBrush = _GDIPlus_BrushCreateSolid () $sc_hPen = _GDIPlus_PenCreate($pColor, 1) ; == For transparency == $ScreenDc = _WinAPI_GetDC($GUI) $gdibitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($bitmap) $dc = _WinAPI_CreateCompatibleDC($ScreenDc) _WinAPI_SelectObject($dc, $gdibitmap) ; == _WinAPI_UpdateLayeredWindow parameters == $tSize = DllStructCreate($tagSIZE) $pSize = DllStructGetPtr($tSize) DllStructSetData($tSize, "X", $width) DllStructSetData($tSize, "Y", $height) $tSource = DllStructCreate($tagPOINT) $pSource = DllStructGetPtr($tSource) $tBlend = DllStructCreate($tagBLENDFUNCTION) $pBlend = DllStructGetPtr($tBlend) Global $alpha = 200 Global $alpha_steps = 5 DllStructSetData($tBlend, "Alpha", $alpha) DllStructSetData($tBlend, "Format", 1) $tPoint = DllStructCreate($tagPOINT) $pPoint = DllStructGetPtr($tPoint) DllStructSetData($tPoint, "X", 0) DllStructSetData($tPoint, "Y", 0) ;=============================================== GUISetState() GUIRegisterMsg($WM_NCHITTEST,   "WM_NCHITTEST")  ;Drag Window GUIRegisterMsg($WM_MOUSEWHEEL, "WM_MOUSEWHEEL")  ;Adjust Trans ;Setup Scroll Font $sc_text_color = 0xFF6209D6 $sc_htextBrush = _GDIPlus_BrushCreateSolid($sc_text_color) $sc_hFormat = _GDIPlus_StringFormatCreate() $sc_hFamily = _GDIPlus_FontFamilyCreate("Arial") $sc_hFont = _GDIPlus_FontCreate($sc_hFamily, $sc_font_size, 2) $sc_pen = _GDIPlus_PenCreate(0) $sc_brush = _GDIPlus_BrushCreateSolid(0) $tLayout = _GDIPlus_RectFCreate(0, 0) ;Text Ini $sc_letter_distance = $sc_font_size $sc_length = $sc_font_size * 1.666 * 0.36 $sc_k = $width $end = 0 $scroller_length = StringLen($sc_text) * $sc_length $sc_FontY = $Height - $height/4 + 40 ;Time init   $Time_hBrush = _GDIPlus_BrushCreateSolid(0xFF008080)   $Time_hFormat = _GDIPlus_StringFormatCreate()   $Time_hFamily = _GDIPlus_FontFamilyCreate("Verdana")   $Time_hFont   = _GDIPlus_FontCreate ($Time_hFamily, 48, 3)   $Time_hLayout = _GDIPlus_RectFCreate(0, 0, $Width, 80)   Do _GDIPlus_GraphicsClear($backbuffer, 0x00000000) ; This is where you do your animation/ draw stuff :-) DrawCorners() DrawTime() DrawDot() ScrollText() ;~  _GDIPlus_GraphicsDrawImageRect($graphics, $bitmap, 0, 0, $width, $height) ; This is used for the transperancy instead of _GDIPlus_GraphicsDrawImageRect     $gdibitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($bitmap)     _WinAPI_SelectObject($dc, $gdibitmap)     _WinAPI_UpdateLayeredWindow($GUI, $ScreenDc, 0, $pSize, $dc, $pSource, 0, $pBlend, 2) _WinAPI_DeleteObject($gdibitmap) Until False * Not Sleep(30) ; Draw the digital time Func DrawTime()   Local $sString, $aSize   $sString = StringFormat("%02d:%02d:%02d", @HOUR, @MIN, @SEC)   $aSize   = _GDIPlus_GraphicsMeasureString($Backbuffer, $sString, $Time_hFont, $Time_hLayout, $Time_hFormat)   DllStructSetData($Time_hLayout, "X", $Width/2 - (DllStructGetData($aSize[0], "Width") / 2))    ; $Width - String length/2   DllStructSetData($Time_hLayout, "Y", 0)                        ; Clock at top ;  DllStructSetData($Time_hLayout, "Y", $Height/2 - (DllStructGetData($aSize[0], "Height") / 2))   ; Clock in middle   _GDIPlus_GraphicsDrawStringEx($BackBuffer, $sString, $Time_hFont, $Time_hLayout, $Time_hFormat, $Time_hBrush) EndFunc ; ================ SCROLL TEXT ==================== Func ScrollText() $sc_FontX = $sc_k + $sc_letter_distance DllStructSetData($tLayout, "x", $sc_FontX) DllStructSetData($tLayout, "y", $sc_FontY) _GDIPlus_GraphicsDrawStringEx($BackBuffer, $sc_text, $sc_hFont, $tLayout, $sc_hFormat, $sc_htextBrush) $sc_k -= 5 If -$scroller_length >= $sc_k Then   $sc_k = $Width EndIf EndFunc ; == Draw Corners == Func DrawCorners() Local $Lgth = 20 $hPen1 = _GDIPlus_PenCreate(0xFF0000AA, 10) ;Top Right       _GDIPlus_GraphicsDrawLine($backBuffer, $Width, 0, $Width - $Lgth, 0, $hPen1)       _GDIPlus_GraphicsDrawLine($backBuffer, $Width, 0, $Width , $Lgth, $hPen1) ;Top Left       _GDIPlus_GraphicsDrawLine($backBuffer, 0, 0, 0, $Lgth, $hPen1)       _GDIPlus_GraphicsDrawLine($backBuffer, 0, 0, $Lgth, 0, $hPen1) ;Bottom Right       _GDIPlus_GraphicsDrawLine($backBuffer, $Width, $Height, $Width, $Height - $Lgth, $hPen1)       _GDIPlus_GraphicsDrawLine($backBuffer, $Width, $Height, $Width - $Lgth, $Height, $hPen1) ;Bottom Left       _GDIPlus_GraphicsDrawLine($backBuffer, 0, $Height, 0, $Height - $Lgth, $hPen1)       _GDIPlus_GraphicsDrawLine($backBuffer, 0, $Height, $Lgth , $Height, $hPen1) _GDIPlus_PenDispose($hPen1) EndFunc Func DrawDot() $dot_k -= 5 If $Dot_k <= -20 Then $dot_k = $Width    _GDIPlus_GraphicsFillEllipse($backBuffer, $Dot_k, $Height/2 -20 ,40, 40)   ; Draw a Dot and move it EndFunc   ; ============= Handle the WM_NCHITTEST message so our window can be dragged =============== Func WM_NCHITTEST($hWnd, $iMsg, $iwParam, $ilParam) Local $hMenu, $Win, $WinX, $WinY, $mX, $mY if $hWnD = $GUI and _IsPressed (01) then Return $HTCAPTION EndFunc #;====================================================================== ; MouseWheel for Win Trans Func WM_MOUSEWHEEL($hWnd, $iMsg, $wParam, $lParam)   Local $mouseData, $n1       $mouseData = _WinAPI_HiWord($wParam)   Select ;Case $wParam = $WM_MOUSEWHEEL And WinActive($GUI) ;WM_MOUSEWHEEL = 0x020A Case WinActive($GUI)    If $mouseData > 0 Then ;wheel up     If $alpha + $alpha_steps <= 512 Then $alpha += $alpha_steps     Switch $alpha      Case 0 To 255       DllStructSetData($tBlend, "Alpha", $alpha)          ; Set Alpha (Transparency) Level       DllStructSetData($tBlend, "Format", 1)      Case 256 To 512       DllStructSetData($tBlend, "Alpha", $alpha - 256)       DllStructSetData($tBlend, "Format", 0)     EndSwitch    Else ;wheel down     If $alpha - $alpha_steps > 0 Then $alpha -= $alpha_steps     Switch $alpha      Case 0 To 255       DllStructSetData($tBlend, "Alpha", $alpha) ;wheel up       DllStructSetData($tBlend, "Format", 1)      Case 256 To 512       DllStructSetData($tBlend, "Alpha", $alpha - 256) ;wheel up       DllStructSetData($tBlend, "Format", 0)     EndSwitch    EndIf    ConsoleWrite($alpha & @CRLF) EndSelect EndFunc ;==>WM_MOUSEWHEEL Func Close() _WinAPI_DeleteDC($dc) _WinAPI_ReleaseDC($GUI, $ScreenDc) _GDIPlus_FontDispose($SC_hFont) _GDIPlus_FontFamilyDispose($SC_hFamily) _GDIPlus_StringFormatDispose($SC_hFormat) _GDIPlus_GraphicsDispose($backbuffer) _GDIPlus_BitmapDispose($bitmap) _GDIPlus_GraphicsDispose($graphics)   _GDIPlus_FontDispose    ($Time_hFont  )   _GDIPlus_FontFamilyDispose  ($Time_hFamily)   _GDIPlus_StringFormatDispose($Time_hFormat)   _GDIPlus_BrushDispose    ($Time_hBrush) _GDIPlus_Shutdown() WinClose($GUI) Exit EndFunc   ;==>Close


#7 Lakes

Lakes

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 1,037 posts

Posted 15 December 2011 - 02:23 PM

And this, not my script this one, search the forum for transparent GUI.
AutoIt         
#include <GuiConstants.au3> #include <WindowsConstants.au3> HotKeySet("{ESC}", "QuitApp") $Main_Gui = GUICreate("", 400, 400, 20, 20, $WS_POPUP, $WS_EX_TOOLWINDOW + $WS_EX_TOPMOST) $But1 = GUICtrlCreateButton(" Exit ", 100, 100, 80, 21) $Info_Edit = GUICtrlCreateEdit("A few words to start off with", 80, 150, 300, 220) GUISetControlsVisible($Main_Gui) GUISetState() While 1     If GUIGetMsg() = $But1 Then Exit WEnd Func GUISetControlsVisible($hWnd)     Local $aClassList, $aM_Mask, $aCtrlPos, $aMask       $aClassList = StringSplit(_WinGetClassListEx($hWnd), @LF)     $aM_Mask = DllCall("gdi32.dll", "long", "CreateRectRgn", "long", 0, "long", 0, "long", 0, "long", 0)       For $i = 1 To UBound($aClassList) - 1         $aCtrlPos = ControlGetPos($hWnd, '', $aClassList[$i])         If Not IsArray($aCtrlPos) Then ContinueLoop               $aMask = DllCall("gdi32.dll", "long", "CreateRectRgn", _             "long", $aCtrlPos[0], _             "long", $aCtrlPos[1], _             "long", $aCtrlPos[0] + $aCtrlPos[2], _             "long", $aCtrlPos[1] + $aCtrlPos[3])         DllCall("gdi32.dll", "long", "CombineRgn", "long", $aM_Mask[0], "long", $aMask[0], "long", $aM_Mask[0], "int", 2)     Next     DllCall("user32.dll", "long", "SetWindowRgn", "hwnd", $hWnd, "long", $aM_Mask[0], "int", 1) EndFunc Func _WinGetClassListEx($sTitle)     Local $sClassList = WinGetClassList($sTitle)     Local $aClassList = StringSplit($sClassList, @LF)     Local $sRetClassList = "", $sHold_List = "|"     Local $aiInHold, $iInHold       For $i = 1 To UBound($aClassList) - 1         If $aClassList[$i] = "" Then ContinueLoop               If StringRegExp($sHold_List, "|" & $aClassList[$i] & "~(d+)|") Then             $aiInHold = StringRegExp($sHold_List, ".*|" & $aClassList[$i] & "~(d+)|.*", 1)             $iInHold = Number($aiInHold[UBound($aiInHold)-1])                       If $iInHold = 0 Then $iInHold += 1                       $aClassList[$i] &= "~" & $iInHold + 1             $sHold_List &= $aClassList[$i] & "|"                       $sRetClassList &= $aClassList[$i] & @LF         Else             $aClassList[$i] &= "~1"             $sHold_List &= $aClassList[$i] & "|"             $sRetClassList &= $aClassList[$i] & @LF         EndIf     Next       Return StringReplace(StringStripWS($sRetClassList, 3), "~", "") EndFunc Func QuitApp()     Exit EndFunc

Edited by Lakes, 15 December 2011 - 02:24 PM.


#8 UEZ

UEZ

    Never say never

  • MVPs
  • 4,871 posts

Posted 15 December 2011 - 03:40 PM

guinness,

good work!

Is it possible to make the background transparent (control overlapping)?

Greets,
-supersonic.

Something like this here?

AutoIt         
#include <StaticConstants.au3> #include <WinAPI.au3> #include <WindowsConstants.au3> $w = 320 $h = 160 $y = $h + 1 $hGUI = GUICreate("Simple Scroller by UEZ 2011", $w, $h) $idButton_Exit = GUICtrlCreateButton("Exit", 140, 60, 40, 40) $idButton_Scroller = GUICtrlCreateButton("Scroller", 40, 60, 80, 40) $hGUI_Child = GUICreate("", $w, $h, 0, 0, $WS_POPUP, $WS_EX_MDICHILD + $WS_EX_LAYERED, $hGUI) GUISetBkColor(0xFEDCBA) $idLabel_Scroller = GUICtrlCreateLabel(Scroller_Text(), 0, $y, $w, $h, $SS_CENTER) GUICtrlSetBkColor(-1, -2) GUICtrlSetColor(-1, 0x0000FF) GUICtrlSetFont(-1, 16) GUISetState(@SW_SHOW, $hGUI) GUISetState(@SW_HIDE, $hGUI_Child) _WinAPI_SetLayeredWindowAttributes($hGUI_Child, 0xFEDCBA) $speed = 1 Do     Switch GUIGetMsg()         Case -3, $idButton_Exit             ExitLoop         Case $idButton_Scroller             GUISetState(@SW_SHOW, $hGUI_Child)             AdlibRegister("Scroll", 50)     EndSwitch Until False GUIDelete() Exit Func Scroller_Text()     Local $text =   "This is a simple scroller" & @LF & _                             "made by " & @LF & _                             "" & @LF & _                             "UEZ 2011"     Return $text EndFunc Func Scroll()     ControlMove($hGUI_Child, "", $idLabel_Scroller, 0, $y)     $y -= $speed     If $y = -$h Then         $y = $h + 1         AdlibUnRegister("Scroll")         GUISetState(@SW_HIDE, $hGUI_Child)         ConsoleWrite("Scroller finished!" & @LF)     EndIf EndFunc


Br,
UEZ

 
The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯


#9 guinness

guinness

    all-consuming swarm in inconspicuous disguise

  • Developers
  • 17,325 posts

Posted 15 December 2011 - 04:08 PM

Thanks Lakes for your alternative. I was wondering if there was a workaround using only the HTML markup language but seems not.

Thanks as well UEZ for your alternative too.

Edited by guinness, 15 December 2011 - 04:09 PM.

Example List: _AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_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()CodingDirToHTML5FileInstallrGeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()LockFile()Mapping CtrlIDsParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...
Updated: 30/07/2014


#10 UEZ

UEZ

    Never say never

  • MVPs
  • 4,871 posts

Posted 15 December 2011 - 04:16 PM

Another GDI+ alternative: GDI+ Vertical Scroller

Br,
UEZ

 
The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯


#11 spudw2k

spudw2k

    passionately misinformed

  • Active Members
  • PipPipPipPipPipPip
  • 1,291 posts

Posted 07 March 2013 - 01:51 PM

Greetings Guinness (yes I know the last post was in Dec. 2011).

I was perusing the examples in your signature and was checking this one out. I noticed when I run your example for some reason all of the 'N' and 'R' letters are being stripped from the displayed scrolling marquee. Anyone ideas why or anyone else experience this?

edit: only appears to affect lowercase 'n' and 'r' characters.
autoit ver 3.3.8.1

Edited by spudw2k, 07 March 2013 - 01:57 PM.


#12 guinness

guinness

    all-consuming swarm in inconspicuous disguise

  • Developers
  • 17,325 posts

Posted 07 March 2013 - 02:14 PM

Try again. The Forum was being difficult by removing the backslashes.

Example List: _AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_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()CodingDirToHTML5FileInstallrGeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()LockFile()Mapping CtrlIDsParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...
Updated: 30/07/2014


#13 spudw2k

spudw2k

    passionately misinformed

  • Active Members
  • PipPipPipPipPipPip
  • 1,291 posts

Posted 07 March 2013 - 02:21 PM

Better now and I see what was going on. Thanks

#14 guinness

guinness

    all-consuming swarm in inconspicuous disguise

  • Developers
  • 17,325 posts

Posted 07 March 2013 - 02:28 PM

OK, so it was fixed?

Example List: _AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_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()CodingDirToHTML5FileInstallrGeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()LockFile()Mapping CtrlIDsParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...
Updated: 30/07/2014


#15 spudw2k

spudw2k

    passionately misinformed

  • Active Members
  • PipPipPipPipPipPip
  • 1,291 posts

Posted 07 March 2013 - 03:51 PM

Yes sir. Thanks

#16 guinness

guinness

    all-consuming swarm in inconspicuous disguise

  • Developers
  • 17,325 posts

Posted 24 October 2013 - 05:59 PM

I wonder if a CSS3 & HTML5 equivalent can actually work in Shell.Explorer.2? Hmmm....

Example List: _AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_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()CodingDirToHTML5FileInstallrGeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()LockFile()Mapping CtrlIDsParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...
Updated: 30/07/2014


#17 guinness

guinness

    all-consuming swarm in inconspicuous disguise

  • Developers
  • 17,325 posts

Posted 16 June 2014 - 09:26 PM

This UDF is now deprecated.


Example List: _AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_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()CodingDirToHTML5FileInstallrGeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()LockFile()Mapping CtrlIDsParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...
Updated: 30/07/2014





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users