Jump to content

Info Bar ( like tickertape)


zac23
 Share

Recommended Posts

Hi,

I got this idear from a web application which in my oppinion looks ugly, so i tried to make one in autoit

I got the basic gui working but needs a bit of work, i tried to put a refresh in but i think i am going the wrong way about the refresh.

1) I need it to refresh every time the text file is changed, or at least on a timer to refresh every minute or something,

2) Is it possible to make the text larger in the label?

3) Is it possibe to get the text scrolling from left to right? <---- this i dont really care about i cant see it being possible but thought id ask anyway

Thanks For any help.

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <StaticConstants.au3>


Opt('MustDeclareVars', 1)

_Main()

Func _Main()


    Local $gui, $msg, $loop = 7
    Local $width = @DesktopWidth, $hight = 60
    Local $File = FileOpen("D:/TEST.txt", 0), $label = FileRead($file)

    $msg = GUICreate("ScrollingText", $width, $hight,0,0,$WS_POPUPWINDOW, $WS_EX_TOPMOST)
    GUICtrlCreateLabel($label,10,10,150,40)
    GUISetState()

    While 1
        $msg = GUIGetMsg(1)
        Select
            #cs Case WinActive("ScrollingText")
                 WinClose("ScrollingText")
                 Run("ScrollingText.exe")
                 sleep(500)
            #ce

            Case $msg[0] = $GUI_EVENT_CLOSE
                Exit
        EndSelect
    WEnd

#cs While WinActive("ScrollingText")
        WinClose("ScrollingText")
        Run("ScrollingText.exe")
        sleep(500)
#ce 
        WEnd

EndFunc
Exit
Link to comment
Share on other sites

You can set the font on the label with GuiCtrlSetFont.

One way to scroll the text sideways would be to

create a child window where the label is, and the same size as the visible part of the label .

create a label which holds all the text.

#include <windowsconstants.au3>
$gui = GUICreate("demo ")

$ch = GUICreate("",100,30,20,80,$WS_CHILD,-1,$gui)
$lbl = GUICtrlCreateLabel("this is some text which is too long to fit in the child window",0,0)
GUISetState(@SW_SHOW,$gui)
GUISetState(@SW_SHOW,$CH)
Adlibenable("slide",50);or AdLibRegister
Global $px = 0
while 1
    if GUIGetMsg() = -3 then Exit
WEnd


func  slide()
    $px -= 1
    GUICtrlSetPos($lbl,$px,0)
    if $px < -250 then $px = 105
EndFunc
Edited by martin
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

  • Moderators

New and improved version can be found here


Hi,

This is a Marquee UDF I wrote some time ago. It has 3 functions:

_GUICtrlMarquee_SetScroll : Sets movement parameters for Marquee

_GUICtrlMarquee_SetDisplay : Sets display parameters for Marquee

_GUICtrlMarquee_Create : Creates Marquee

This is the UDF proper - save it as Marquee.au3:

#include-once

; #INDEX# =======================================================================================================================
; Title .........: Marquee
; Description ...: This module contains various Marquee functions
; ===============================================================================================================================

; #CURRENT# =====================================================================================================================
;_GUICtrlMarquee_SetScroll  : Sets movement parameters for Marquee
;_GUICtrlMarquee_SetDisplay : Sets display parameters for Marquee
;_GUICtrlMarquee_Create     : Creates Marquee
; ===============================================================================================================================

; #INTERNAL_USE_ONLY#============================================================================================================
;================================================================================================================================

; #INCLUDES# ====================================================================================================================
#include <WindowsConstants.au3>
#include <WinAPI.au3>

; #GLOBAL VARIABLES# ============================================================================================================
Global $iMarquee_Loop       = 0
Global $sMarquee_Move       = "scroll"
Global $sMarquee_Direction  = "left"
Global $iMarquee_Scroll     = 6
Global $iMarquee_Delay      = 85
Global $iMarquee_Border     = 0
Global $vMarquee_TxtCol     = Default
Global $sMarquee_BkCol      = Default
Global $sMarquee_FontFamily = "Tahoma"
Global $iMarquee_FontSize   = 12

; #FUNCTION# ====================================================================================================================
; Name...........: _GUICtrlMarquee_SetScroll
; Description ...: Sets movement parameters for subsequent _GUICtrlCreateMarquee calls
; Syntax.........: _GUICtrlMarquee_SetScroll([$iLoop, [$sMove, [$sDirection, [$iScroll, [$iDelay]]]]])
; Parameters ....: $iLoop        - [optional] Number of loops to repeat. (Default = infinite)
;                                      Use "slide" movement to keep text visible after stopping
;                  $sMove        - [optional] Movement of text.  From  "scroll" (Default), "slide" and "alternate".
;                  $sDirection   - [optional] Direction of scrolling.  From "left" (Default), "right", "up" and "down".
;                  $iScroll      - [optional] Distance of each advance - controls speed of scrolling (Default = 6)
;                                      Higher numbers increase speed, lower numbers give smoother animation.
;                  $iDelay       - [optional] Time in milliseconds between each advance (Default = 85).
;                                      Higher numbers lower speed, lower numbers give smoother animation.
; Return values .: Success - Returns 0.
; Author ........: Melba 23, based on some original code by james3mg, trancexx and jscript "FROM BRAZIL"
; Related .......: _GUICtrlMarquee_Create, _GUICtrlMarquee_SetDisplay, ObjCreate
; Link ..........;
; Example .......; Yes
; ===============================================================================================================================

Func _GUICtrlMarquee_SetScroll( $iLoop = 0, $sMove = 'scroll', $sDirection = 'left', $iScroll = 6, $iDelay = 85)

    ; Errorcheck and set parameters
    If IsNumber($iLoop) Then $iMarquee_Loop = Int(Abs($iLoop))

    Switch $sMove
        Case 'alternate', 'slide'
            $sMarquee_Move = $sMove
        Case Else
            $sMarquee_Move = 'scroll'
    EndSwitch

    Switch $sDirection
        Case 'right', 'up', 'down'
            $sMarquee_Direction = $sDirection
        Case Else
            $sMarquee_Direction = 'left'
    EndSwitch

    If IsNumber($iScroll) Then $iMarquee_Scroll = Int(Abs($iScroll))

    If IsNumber($iDelay) Then $iMarquee_Delay = Int(Abs($iDelay))

EndFunc ;=> _GUICtrlMarquee_SetScroll

; #FUNCTION# ====================================================================================================================
; Name...........: _GUICtrlMarquee_SetDisplay
; Description ...: Sets display parameters for subsequent _GUICtrlCreateMarquee calls
; Syntax.........: _GUICtrlMarquee_SetDisplay([$iBorder, [$vTxtCol, [$vBkCol, [$iPoint, [$sFont]]]])
; Parameters ....: $iBorder - [optional] 0 = None (Default), 1 = 1 pixel, 2 = 2 pixel, 3 = 3 pixel
;                  $vTxtCol - [optional] Colour for text (Default = system colour, -1 = unchanged)
;                  $vBkCol  - [optional] Colour for Marquee (Default = system colour, -1 = unchanged)
;                             Colour can be passed as RGB value or as one of the following strings:
;                                'black', 'gray', 'white', 'silver', 'maroon', 'red', 'purple', 'fuchsia',
;                                'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua'
;                  $iPoint  - [optional] Font size (Default = 12, -1 = unchanged)
;                  $sFont   - [optional] Font to use (Default = Tahoma, "" = unchanged)
; Return values .: Success - Returns 0.
; Author ........: Melba 23, based on some original code by james3mg, trancexx and jscript "FROM BRAZIL"
; Related .......: _GUICtrlMarquee_Create, _GUICtrlMarquee_SetScroll, ObjCreate
; Link ..........;
; Example .......; Yes
; ===============================================================================================================================

Func  _GUICtrlMarquee_SetDisplay($iBorder = Default, $vTxtCol = Default, $vBkCol = Default, $iPoint = Default, $sFont = Default)

    ; Errorcheck and set parameters
    Select
        Case $iBorder = Default
            $iMarquee_Border = 0
        Case $iBorder >= 0 And $iBorder <= 3
            $iMarquee_Border = Int(Abs($iBorder))
        Case Else
    EndSelect

    Select
        Case $vTxtCol = Default
            $vMarquee_TxtCol = _WinAPI_GetSysColor($COLOR_WINDOWTEXT)
        Case IsNumber($vTxtCol) = 1
            If $vTxtCol >= 0 And $vTxtCol <= 0xFFFFFF Then $vMarquee_TxtCol = Int($vTxtCol)
        Case Else
            $vMarquee_TxtCol = $vTxtCol
    EndSelect

    Select
        Case $vBkCol = Default
            $sMarquee_BkCol = _WinAPI_GetSysColor($COLOR_WINDOW)
        Case  IsNumber($vBkCol) = 1
            If $vBkCol >= 0 And $vBkCol <= 0xFFFFFF Then $sMarquee_BkCol = Int($vBkCol)
        Case Else
            $sMarquee_BkCol = $vBkCol
    EndSelect

    Select
        Case $iPoint = Default
            $iMarquee_FontSize = 12
        Case $iPoint = -1
        Case Else
            If IsNumber($iPoint) Then $iMarquee_FontSize = Int(Abs($iPoint / .75))
    EndSelect

    Select
        Case $sFont = Default
            $sMarquee_FontFamily = "Tahoma"
        Case $sFont = ""
        Case Else
            If IsString($sFont) Then $sMarquee_FontFamily = $sFont
    EndSelect

EndFunc ;=> _GUICtrlMarquee_SetDisplay

; #FUNCTION# ====================================================================================================================
; Name...........: _GUICtrlMarquee_Create
; Description ...: Creates a marquee Label control for the GUI
; Syntax.........: _GUICtrlMarquee_Create( $sText, $iLeft, $iTop, $iWidth, $iHeight, [$sTipText])
; Parameters ....: $sText   - The text (or HTML markup) the marquee should display.
;                  $iLeft   - The Left side of the control. If -1 is used then left will be computed according to GUICoordMode.
;                  $iTop    - The Top of the control. If -1 is used then left will be computed according to GUICoordMode.
;                  $iWidth  - The width of the control.
;                  $iHeight - The height of the control.
;                  $sTipTxt - [optional] Tip text displayed when mouse hovers over the control.
; Return values .: Success - Returns the identifier (controlID) of the new Marquee control.
;                  Failure - Returns 0
; Author ........: james3mg, trancexx and jscript "FROM BRAZIL"
; Modified.......: Melba23
; Remarks .......: This function attempts to embed an 'ActiveX Control' or a 'Document Object' inside the GUI.
;                  The GUI functions GUICtrlRead and GUICtrlSet have no effect on this control. The object can only be
;                  controlled using 'methods' or 'properties' on the $ObjectVar.
; Related .......: _GUICtrlMarquee_SetDisplay, _GUICtrlMarquee_SetScroll, ObjCreate
; Link ..........;
; Example .......; Yes
; ===============================================================================================================================

Func _GUICtrlMarquee_Create($sText, $iLeft, $iTop, $iWidth, $iHeight, $sTipText = "")

    ; Declar Local variables
    Local $oShell, $iCtrlID

    $oShell = ObjCreate("Shell.Explorer.2")
    If Not IsObj($oShell) Then Return SetError(1, 0, -1)

    $iCtrlID = GUICtrlCreateObj($oShell, $iLeft, $iTop, $iWidth, $iHeight)

    $oShell.navigate("&#097;bout:blank")
    While $oShell.busy
        Sleep(100)
    WEnd

    With $oShell.document
        .write('<style>marquee{cursor: default}></style>')
        .write('<body &#111;nselectstart="return false" &#111;ncontextmenu="return false" &#111;nclick="return false" &#111;ndragstart="return false" &#111;ndragover="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($sText)
        .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

    Return $iCtrlID

EndFunc ;=> _GUICtrlMarquee_Create

And this is an example script to show it working:

#include <Marquee.au3>

GUICreate("Marquee Example", 320, 220)

_GUICtrlMarquee_Create("Default Marquee Parameters",    10,  10, 300, 20)

_GUICtrlMarquee_SetScroll(Default, "alternate", "right", 7, Default)
_GUICtrlMarquee_SetDisplay(1, 0xFF0000, 0xFFFF00, 12, "times new roman")
_GUICtrlMarquee_Create("Back And Forth",    10, 45, 300, 20)

_GUICtrlMarquee_SetScroll(0, Default, "up", 1)
_GUICtrlMarquee_SetDisplay(2, "green", Default, 18, "comic sans ms")
_GUICtrlMarquee_Create("Up and Up...",  10, 80, 150, 30, "Vertical Scroll Up")

_GUICtrlMarquee_SetScroll(0, Default, "down", 1)
_GUICtrlMarquee_SetDisplay(2, "fuchsia", -1, "", -1)
_GUICtrlMarquee_Create("Down We Go", 160, 80, 150, 30, "Vertical Scroll Down")

_GUICtrlMarquee_SetScroll(0, Default, "right", Default, 120)
_GUICtrlMarquee_SetDisplay(3, "red", "silver", 12, "arial")
_GUICtrlMarquee_Create("And slowly to the right", 10, 120, 300, 26)

_GUICtrlMarquee_SetScroll(-1, "slide", Default, 2)
_GUICtrlMarquee_SetDisplay(1, "blue", "cyan", 9, "courier new")
_GUICtrlMarquee_Create(" Just the once", 10, 160, 300, 17)

_GUICtrlMarquee_SetScroll()
_GUICtrlMarquee_SetDisplay()
_GUICtrlMarquee_Create("Default Marquee Parameters",    10, 190, 300, 20, "Everything at default")

GUISetState()

While 1
    If GUIGetMsg() = -3 Then Exit
WEnd

I hope you find it useful. :)

M23

Edited by Melba23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • 2 weeks later...

Hi,

thankyou melba23 for the UDF it helped alot, and martin for the Adlibenable for the refresh.

this is what i've come up with

#include <Marquee.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <StaticConstants.au3>

Local $width = @DesktopWidth, $hight = 60
Local $File = FileOpen("mess.txt",0)
Local $label = FileRead($file)
GUICreate("ScrollingMarquee v1.0", $width, $hight,0,0,$WS_POPUPWINDOW, $WS_EX_TOPMOST)
AdlibEnable ("Refresh",35000)
_GUICtrlMarquee_SetScroll(0, Default, "left", Default, 120)
_GUICtrlMarquee_SetDisplay(1, 0x000000, 0x99CCFF, 26, "Comic Sans MS")
_GUICtrlMarquee_Create($label, 0, 0, $width, $hight)

GUISetState()
    Func Refresh()
        If WinExists("ScrollingMarquee v1.0") Then
        WinClose("ScrollingMarquee v1.0")
        Run("ScrollingMarquee.exe")
        EndIf
    EndFunc
While 1
    If GUIGetMsg() = -3 Then Exit
WEnd
Link to comment
Share on other sites

  • 2 weeks later...

Right so i sat on it a few days and thought it was ready for deployment,

but the first thing someone said to me was "i want it at the bottom, how do you move it?"

i messed around whith extended styles and a few other setings to see if i could simply get it to "click and drag"

but i couldn't figure out how to do this without ending up with an ugly blue tool bar,

is there a way to make it so anywhere i click in the window i will be able to drag the window around?

or better yet an option that snaps it to the bottom you can chose when you rightclick in the task bar ( like instead of min/max it will be bottom/top) i think this way is possible but not sure how to go about it.

Thanks for any help.

Zac

Edited by zac23
Link to comment
Share on other sites

  • Moderators

zac23,

is there a way to make it so anywhere i click in the window i will be able to drag the window around?

Easy - if you know how!: :)

#include <Marquee.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <StaticConstants.au3>
#include <SendMessage.au3>

Local $width = @DesktopWidth, $height = 60
Local $File = FileOpen("mess.txt",0)
Local $label = "Hi there!"

Global Const $SC_DRAGMOVE = 0xF012

$hGUI = GUICreate("ScrollingMarquee v1.0", $width, $height,0,0,$WS_POPUPWINDOW, $WS_EX_TOPMOST)
AdlibEnable ("Refresh",35000)
_GUICtrlMarquee_SetScroll(0, Default, "left", Default, 120)
_GUICtrlMarquee_SetDisplay(1, 0x000000, 0x99CCFF, 26, "Comic Sans MS")
_GUICtrlMarquee_Create($label, 0, 0, $width, $height)

GUISetState()

While 1
    If GUIGetMsg() = $GUI_EVENT_PRIMARYDOWN Then
        _SendMessage($hGUI, $WM_SYSCOMMAND, $SC_DRAGMOVE, 0)
    EndIf
WEnd

Func Refresh()
    If WinExists("ScrollingMarquee v1.0") Then
    WinClose("ScrollingMarquee v1.0")
    Run("ScrollingMarquee.exe")
    EndIf
EndFunc

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Moderators

zac23,

better yet an option that snaps it to the bottom you can chose when you rightclick in the task bar

Et voila:

#include <Marquee.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <StaticConstants.au3>

Local $File = FileOpen("mess.txt", 0)
Local $label = "Hi there!"
Global $aMarquee_Coords[4] = [0, 0, @DesktopWidth, 60]
Global $fMarquee_Pos = "top"

Opt("TrayOnEventMode", 1) ; Use event trapping for tray menu
Opt("TrayMenuMode", 3) ; Default tray menu items will not be shown.

Global $hTray_Top_Item = TrayCreateItem("Top")
TrayItemSetOnEvent(-1, "On_Place")
Global $hTray_Bot_Item = TrayCreateItem("Bottom")
TrayItemSetOnEvent(-1, "On_Place")
TrayCreateItem("")
TrayCreateItem("Exit")
TrayItemSetOnEvent(-1, "On_Exit")

TraySetState()

Find_Taskbar($aMarquee_Coords)
If @error Then MsgBox(0, "Error", "Could not find taskbar")

$hGUI = GUICreate("ScrollingMarquee v1.0", $aMarquee_Coords[2], $aMarquee_Coords[3], $aMarquee_Coords[0], $aMarquee_Coords[1], $WS_POPUPWINDOW, $WS_EX_TOPMOST)
AdlibEnable("Refresh", 35000)
_GUICtrlMarquee_SetScroll(0, Default, "left", Default, 120)
_GUICtrlMarquee_SetDisplay(1, 0x000000, 0x99CCFF, 26, "Comic Sans MS")
_GUICtrlMarquee_Create($label, 0, 0, $aMarquee_Coords[2], $aMarquee_Coords[3])

GUISetState()

While 1
    Sleep(10)
WEnd

Func Refresh()
    If WinExists("ScrollingMarquee v1.0") Then
        WinClose("ScrollingMarquee v1.0")
        Run("ScrollingMarquee.exe")
    EndIf
EndFunc   ;==>Refresh

Func On_Exit()
    Exit
EndFunc

Func On_Place()

    If $fMarquee_Pos = "top" Then
        $fMarquee_Pos = "bottom"
    Else
        $fMarquee_Pos = "top"
    EndIf

    Find_Taskbar($aMarquee_Coords)
    WinMove($hGUI, "", $aMarquee_Coords[0], $aMarquee_Coords[1], $aMarquee_Coords[2], $aMarquee_Coords[3])

EndFunc

Func Find_Taskbar(ByRef $aMarquee_Coords)

    ; Find systray and get size
    Local $iPrevMode = AutoItSetOption("WinTitleMatchMode", 4)
    Local $aTray_Pos = WinGetPos("classname=Shell_TrayWnd")
    AutoItSetOption("WinTitleMatchMode", $iPrevMode)

    ; If error in finding systray
    If Not IsArray($aTray_Pos) Then Return SetError(1, 0)

    ; Determine position of taskbar
    If $aTray_Pos[1] > 0 Then
        ; Taskbar at BOTTOM so coords of the marquee are
        $aMarquee_Coords[0] = 0
        $aMarquee_Coords[2] = @DesktopWidth
        If $fMarquee_Pos = "top" Then
            $aMarquee_Coords[1] = 0
        Else
            $aMarquee_Coords[1] = @DesktopHeight - $aTray_Pos[3] - 60
        EndIf
    ElseIf $aTray_Pos[0] > 0 Then
        ; Taskbar at RIGHT so coords of the marquee are
        $aMarquee_Coords[0] = 0
        $aMarquee_Coords[2] = @DesktopWidth - $aTray_Pos[2]
        If $fMarquee_Pos = "top" Then
            $aMarquee_Coords[1] = 0
        Else
            $aMarquee_Coords[1] = @DesktopHeight - 60
        EndIf
    ElseIf $aTray_Pos[2] = @DesktopWidth Then
        ; Taskbar at TOP so coords of the marquee are
        $aMarquee_Coords[0] = 0
        $aMarquee_Coords[2] = @DesktopWidth
        If $fMarquee_Pos = "top" Then
            $aMarquee_Coords[1] = $aTray_Pos[3]
        Else
            $aMarquee_Coords[1] = @DesktopHeight - 60
        EndIf
    ElseIf $aTray_Pos[3] = @DesktopHeight Then
        ; Taskbar at LEFT so coords of the marquee are
        $aMarquee_Coords[0] = $aTray_Pos[2]
        $aMarquee_Coords[2] = @DesktopWidth - $aTray_Pos[2]
        If $fMarquee_Pos = "top" Then
            $aMarquee_Coords[1] = 0
        Else
            $aMarquee_Coords[1] = @DesktopHeight - 60
        EndIf
    EndIf

EndFunc

The "top/bottom" choice is in the systray icon menu. It automatically avoids the taskbar, regardless of where it is on the screen (I enjoyed coding that bit! :) )

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • 10 months later...
  • 4 months later...

Is it possible to integrate a progress bar with the scrolling marquee?

Back and Forth

_GUICtrlMarquee_SetScroll(Default, "alternate", "right", 7, Default)
$progressbar = GUICtrlCreateProgress(10, 45, 300, 20, _GUICtrlMarquee_Create("please wait",    10, 45, 200, 20))
Link to comment
Share on other sites

  • Moderators

sliceofpie,

If you use solid blocks as text you get this:

#include <Marquee.au3>

GUICreate("Marquee Progress", 320, 220)

_GUICtrlMarquee_SetScroll(Default, "alternate", "right", 7, Default)
_GUICtrlMarquee_SetDisplay(1, 0x00FF00, 0xFFFFC0, 12, "Arial")
_GUICtrlMarquee_Create(ChrW(0x2588) & ChrW(0x2588) & ChrW(0x2588), 10, 45, 300, 20)

GUISetState()

While 1
    If GUIGetMsg() = -3 Then Exit
WEnd

Any use? :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Thats better than my way >> ;) I was trying to think outside the box and didn't think about ChrW(0x2588) :)

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

  • Moderators

guinness,

And I was just about to congratulate you on your solution! :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

You still can ... :) I'm joking of course. It was a very quick 5mins of my time.

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

  • 11 months later...

So many links to this Marquee UDF. Why not add to the Example forum?

I was aggravated that my text read from a txt file was not being read in with line returns, until I noticed that it interprets HTML. Even better, I like that - many formatting options available.

Thanks Melba23 and those from Brazil for making this happen.

Link to comment
Share on other sites

  • 3 weeks later...
Link to comment
Share on other sites

Link to comment
Share on other sites

  • Moderators

Belini,

_GUICtrlMarquee_Create returns a standard ControlID, so use GUICtrlDelete to destroy the marquee. :oops:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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...