Jump to content

Marquee UDF - New release 13 Jan 2019


Recommended Posts

  • Moderators

Efo74,

I am but a hobbyist coder as well - but with perhaps just a little more experience than you . It was ~50 years ago I got my first experience of programming a computer to play Nim thanks to my very progressive 6th form maths master. We were using the mainframe of Imperial College - where a few years later I took my only formal programming classes (in Fortran) as part of my Aeronautical Engineering degree. Since then I have used various flavours of Sinclair home computers and then PCs, using Basic, assembly and AutoIt languages. It has given me a lot of pleasure over the years.

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 post
Share on other sites
  • Replies 70
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

New version - 13 Jan 2019  - Added: 2 new functions to hide/show and existing marquee. New UDF and example script in zip format: Marquee.zip As always, ready for compliments and/or comp

Efo74, I am but a hobbyist coder as well - but with perhaps just a little more experience than you . It was ~50 years ago I got my first experience of programming a computer to play Nim thanks to

New version - 13 Jan 2019  - Added: 2 new functions to hide/show and existing marquee. New UDF and example script in zip in first post. M23

  • 4 months later...

Guys, my first day in looking into this great script. I need to modify the text displayed in the Marquee. I assume it is being called by $iIndex or $sText.

how do I modify what is currently running. I am new and under pressure to change the domain logon script to run marquee.au3 with the updated corona message. Help @Melba23 and all you other coders out here 😭

Link to post
Share on other sites
  • Moderators

karldrogo,

Welcome to the AutoIt forum.

The text displayed by the marquee is set by the $sText  parameter of the _GUICtrlMarquee_Create function as explained in the function header:

;    $sText - The text (or HTML markup) the marquee should display

So you need to modify the string setting that parameter to get a new message.

If you need more help than post the code that you are using - see here how to do it

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 post
Share on other sites
  • 4 months later...

Greetings @Melba 23 can you use your UDF with a transparent background, with only the letters overlaying an image?

Link to post
Share on other sites
  • Moderators

Belini,

I do not believe you can have "transparent" as the background colour of a marquee, sorry.

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 post
Share on other sites
18 hours ago, Belini said:

Greetings @Melba 23 can you use your UDF with a transparent background, with only the letters overlaying an image?

... a possible way to make transparent background,
but perhaps only useful if you want to create a large standalone marquee on your desktop (not to overlay it on an image within a gui ...

#include <WindowsConstants.au3>
#include "Marquee.au3"

#include <WinAPI.au3>

$hGUI = GUICreate("Big Ticker", @DesktopWidth, 50, 0, 0, $WS_POPUPWINDOW, BitOR($WS_EX_LAYERED, $WS_EX_TOPMOST))

; ----- make $AlphaKey transparent -----------------------------------
Global $AlphaKey = 0xFFFFFF
_WinAPI_SetLayeredWindowAttributes($hGUI, $AlphaKey, 0, $LWA_COLORKEY)
GUISetBkColor($AlphaKey, $hGUI)
GUISetState(@SW_SHOW, $hGUI)
; --------------------------------------------------------------------
Global $sText = "The quick brown fox jumps over the lazy dog."

$iMarqueeIndex = _GUICtrlMarquee_Init()
_GUICtrlMarquee_SetScroll($iMarqueeIndex, 0, Default, "left", Default, 50)
_GUICtrlMarquee_SetDisplay($iMarqueeIndex, 0, 0xFFFF00, $AlphaKey, 26, "Comic Sans MS")
_GUICtrlMarquee_Create($iMarqueeIndex, $sText, 0, 0, @DesktopWidth, 50)

MsgBox(0,'', 'hit ok to end the script')

 

small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

Link to post
Share on other sites

Thanks @Chimp but what I really needed was to overlay an image.

Jukebel.jpg

I wanted to maintain the effect it has on the image and too without transparency whenever i change the background image i will need to change the background color of the text message too.

Edited by Belini
Link to post
Share on other sites

@Belini maybe something like this ?

#include <GDIPlus.au3>
#include <GUIConstantsEx.au3>
#include <WinAPISysWin.au3>
#include <WindowsConstants.au3>
#include "Marquee.au3"

$sFileName = @ScriptDir & "\Jukebel.jpg" ; your pic in post just above
If Not FileExists($sFileName) Then Exit MsgBox(0, "Exit", "Image not found")

_GDIPlus_Startup()
$hImage = _GDIPlus_BitmapCreateFromFile($sFileName)
$hBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage)
$iW = _GDIPlus_ImageGetWidth($hImage)
$iH = _GDIPlus_ImageGetHeight($hImage)

$hGUI = GUICreate("", $iW, $iH, -1, -1, $WS_POPUP, BitOr($WS_EX_LAYERED, $WS_EX_CONTROLPARENT))
_WinAPI_UpdateLayeredWindowEx($hGUI, -1, -1, $hBitmap)

$hGUI2 = GUICreate("", $iW, $iH, -1, -1, $WS_POPUP, BitOr($WS_EX_LAYERED, $WS_EX_MDICHILD), $hGUI)
GUISetBkColor(0xABCDEF, $hGUI2) ; transparent
_WinAPI_SetLayeredWindowAttributes($hGUI2, 0xABCDEF)

$sText = "The quick brown fox jumps over the lazy dog."
$iMarqueeIndex = _GUICtrlMarquee_Init()
_GUICtrlMarquee_SetScroll($iMarqueeIndex, 0, Default, "left", Default, 50)
_GUICtrlMarquee_SetDisplay($iMarqueeIndex, 0, 0xFFFF00, 0xABCDEF, 26, "Comic Sans MS") ; 0xFFFF00 = yellow
_GUICtrlMarquee_Create($iMarqueeIndex, $sText, 5, 10, $iW, 50)

GUISetState(@SW_SHOW, $hGUI2)
GUISetState(@SW_SHOW, $hGUI)

Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE

GUIDelete($hGUI2)
GUIDelete($hGUI)
_WinAPI_DeleteObject($hBitmap)
_GDIPlus_BitmapDispose($hImage)
_GDIPlus_Shutdown()

Edit : Removed $WS_EX_TOPMOST extended style from $hGUI . Added $WS_EX_CONTROLPARENT extended style (making image draggable : AutoIt feature) . ESC to Exit

Edited by pixelsearch
Link to post
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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...