BigDaddyO Posted June 6, 2018 Share Posted June 6, 2018 Hello, I know this is an old UDF, but i'm trying to make an Alert Ticker on my screen with it. My problem, is that I want the ticker to close when I click on it but I can't seem to identify when it's clicked. Below is a sample of what I'm trying to do. Any ideas? expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <ButtonConstants.au3> #include "Marquee.au3" Opt("GUIOnEventMode", 1) Opt("TrayOnEventMode", 1) Opt("TrayMenuMode", 3) Global $aMarquee_Coords[4] = [0, 0, @DesktopWidth, 30] Global $aMarquee[8] Global $sText = "(UserID) has been added to the AD group_________Click to dismiss this alert" Find_Taskbar($aMarquee_Coords, $aMarquee_Coords[3]) ;Look for the TaskBar ; Create ticker $hGUI = GUICreate("Marquee Example 2", $aMarquee_Coords[2], $aMarquee_Coords[3], $aMarquee_Coords[0], $aMarquee_Coords[1], $WS_POPUPWINDOW, $WS_EX_TOPMOST) $aMarquee[7] = _GUICtrlMarquee_Init() _GUICtrlMarquee_SetScroll($aMarquee[7], 0, Default, "left", Default, 80) _GUICtrlMarquee_SetDisplay($aMarquee[7], 1, "white", "black", 14, "Comic Sans MS") $oMarquee = _GUICtrlMarquee_Create($aMarquee[7], $sText, 0, 0, $aMarquee_Coords[2], $aMarquee_Coords[3]) GUICtrlSetOnEvent($oMarquee, "On_Exit") ;<== how do I know when the marquee is clicked so I can close it? GUISetState() ; Create the tray menu, this is just for testing since click to close won't work yet TrayCreateItem("Exit") TrayItemSetOnEvent(-1, "On_Exit") TraySetState() ; main loop While 1 sleep(10) WEnd Func On_Exit() _GUICtrlMarquee_Delete($aMarquee[7]) sleep(2000) ;Just testing to make sure the ticker goes away before closing Exit EndFunc Func Find_Taskbar(ByRef $aMarquee_Coords, $iGUIh = 60) ; Find taskbar and get size Local $aTaskBar_Pos = WinGetPos("[CLASS:Shell_TrayWnd]") ; If error in finding taskbar If Not IsArray($aTaskBar_Pos) Then $aMarquee_Coords[0] = 0 $aMarquee_Coords[2] = @DesktopWidth $aMarquee_Coords[1] = @DesktopHeight - $aTaskBar_Pos[3] - 100 - $iGUIh Return EndIf ; Determine position of taskbar If $aTaskBar_Pos[1] > 0 Then ; Taskbar at BOTTOM so coords of the marquee are $aMarquee_Coords[0] = 0 $aMarquee_Coords[2] = @DesktopWidth $aMarquee_Coords[1] = @DesktopHeight - $aTaskBar_Pos[3] - $iGUIh ElseIf $aTaskBar_Pos[0] > 0 Then ; Taskbar at RIGHT so coords of the marquee are $aMarquee_Coords[0] = 0 $aMarquee_Coords[2] = @DesktopWidth - $aTaskBar_Pos[2] $aMarquee_Coords[1] = @DesktopHeight - $iGUIh ElseIf $aTaskBar_Pos[2] = @DesktopWidth Then ; Taskbar at TOP so coords of the marquee are $aMarquee_Coords[0] = 0 $aMarquee_Coords[2] = @DesktopWidth $aMarquee_Coords[1] = @DesktopHeight - $iGUIh ElseIf $aTaskBar_Pos[3] = @DesktopHeight Then ; Taskbar at LEFT so coords of the marquee are $aMarquee_Coords[0] = $aTaskBar_Pos[2] $aMarquee_Coords[2] = @DesktopWidth - $aTaskBar_Pos[2] $aMarquee_Coords[1] = @DesktopHeight - $iGUIh EndIf EndFunc Thanks, Mike Link to comment Share on other sites More sharing options...
Deye Posted June 6, 2018 Share Posted June 6, 2018 how will this work for you as a workaround ;~ fill in the blanks .. $tmp = WinGetTitle("[ACTIVE]") ; Create ticker ;~ ......... ;~ GUISetState() WinActivate($tmp) ;~ ................ ; main loop While 1 If WinGetHandle(WinGetTitle("[ACTIVE]"), '') = $hGUI Then Exit Sleep(1000) WEnd ;~ ..continue script Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 6, 2018 Author Moderators Share Posted June 6, 2018 BigDaddyO, The return from _GUICtrlMarquee_Create is a simple 0/1 (as explained in the function header) so you cannot set an event to the marquee itself. What you can do is look for a click on the GUI which contains the marquee - like this: expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <ButtonConstants.au3> #include "Marquee.au3" Opt("GUIOnEventMode", 1) Opt("TrayOnEventMode", 1) Opt("TrayMenuMode", 3) Global $aMarquee_Coords[4] = [0, 0, @DesktopWidth, 30] Global $aMarquee[8] Global $sText = "(UserID) has been added to the AD group_________Click to dismiss this alert" Find_Taskbar($aMarquee_Coords, $aMarquee_Coords[3]) ;Look for the TaskBar ; Create ticker $hGUI = GUICreate("Marquee Example 2", $aMarquee_Coords[2], $aMarquee_Coords[3], $aMarquee_Coords[0], $aMarquee_Coords[1], $WS_POPUPWINDOW, $WS_EX_TOPMOST) $aMarquee[7] = _GUICtrlMarquee_Init() _GUICtrlMarquee_SetScroll($aMarquee[7], 0, Default, "left", Default, 80) _GUICtrlMarquee_SetDisplay($aMarquee[7], 1, "white", "black", 14, "Comic Sans MS") $oMarquee = _GUICtrlMarquee_Create($aMarquee[7], $sText, 0, 0, $aMarquee_Coords[2], $aMarquee_Coords[3]) GUISetOnEvent($GUI_EVENT_PRIMARYUP, "On_Exit", $hGUI) ; Look for a primary mouse button up on the GUI GUISetState() ; Create the tray menu, this is just for testing since click to close won't work yet TrayCreateItem("Exit") TrayItemSetOnEvent(-1, "On_Exit") TraySetState() ; main loop While 1 sleep(10) WEnd Func On_Exit() _GUICtrlMarquee_Delete($aMarquee[7]) sleep(2000) ;Just testing to make sure the ticker goes away before closing Exit EndFunc Func Find_Taskbar(ByRef $aMarquee_Coords, $iGUIh = 60) ; Find taskbar and get size Local $aTaskBar_Pos = WinGetPos("[CLASS:Shell_TrayWnd]") ; If error in finding taskbar If Not IsArray($aTaskBar_Pos) Then $aMarquee_Coords[0] = 0 $aMarquee_Coords[2] = @DesktopWidth $aMarquee_Coords[1] = @DesktopHeight - $aTaskBar_Pos[3] - 100 - $iGUIh Return EndIf ; Determine position of taskbar If $aTaskBar_Pos[1] > 0 Then ; Taskbar at BOTTOM so coords of the marquee are $aMarquee_Coords[0] = 0 $aMarquee_Coords[2] = @DesktopWidth $aMarquee_Coords[1] = @DesktopHeight - $aTaskBar_Pos[3] - $iGUIh ElseIf $aTaskBar_Pos[0] > 0 Then ; Taskbar at RIGHT so coords of the marquee are $aMarquee_Coords[0] = 0 $aMarquee_Coords[2] = @DesktopWidth - $aTaskBar_Pos[2] $aMarquee_Coords[1] = @DesktopHeight - $iGUIh ElseIf $aTaskBar_Pos[2] = @DesktopWidth Then ; Taskbar at TOP so coords of the marquee are $aMarquee_Coords[0] = 0 $aMarquee_Coords[2] = @DesktopWidth $aMarquee_Coords[1] = @DesktopHeight - $iGUIh ElseIf $aTaskBar_Pos[3] = @DesktopHeight Then ; Taskbar at LEFT so coords of the marquee are $aMarquee_Coords[0] = $aTaskBar_Pos[2] $aMarquee_Coords[2] = @DesktopWidth - $aTaskBar_Pos[2] $aMarquee_Coords[1] = @DesktopHeight - $iGUIh EndIf EndFunc That works fine for me. M23 BigDaddyO 1 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 columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
BigDaddyO Posted June 7, 2018 Share Posted June 7, 2018 Thanks Melba that works great Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 13, 2019 Author Moderators Share Posted January 13, 2019 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 Belini and Skysnake 1 1 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 columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Draygoes Posted February 6, 2019 Share Posted February 6, 2019 (edited) Hey guys. So this is embarrassing, but I am super out of practice right now. I am trying to create a Big Marquee at the top of the screen, such as the one shown in the demo. A lot of the code that I am using was pasted from the Demo. For some reason, nothing shows up. I feel like this should be very simple, but I can't quite put my finger on what is going wrong. Thank you all for your time. expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <MsgBoxConstants.au3> #include <StaticConstants.au3> #include "Marquee.au3" Global $aMarquee_Coords[4] = [0, 0, @DesktopWidth, 60] Global $fMarquee_Pos = "top" Global $iIndex = 0 Global $hBigTickerGUI Local Static $iMarqueeIndex While 1 WEnd $hGUI = GUICreate("Marquee Examples", 500, 250) GUISetBkColor(0xC4C4C4) GUISetState(@SW_SHOW) $cLabel = GUICtrlCreateLabel("", 10, 10, 480, 30, $SS_CENTER) GUICtrlSetFont($cLabel, 18) ; Create a marquee $iMarqueeIndex = _GUICtrlMarquee_Init() _GUICtrlMarquee_Create($iMarqueeIndex, "Default Marquee Parameters", 100, 100, 300, 20) ; This is a serious resize! _GUICtrlMarquee_Delete($iMarqueeIndex) _BigTicker() GUICtrlSetData($cLabel, "Big Ticker Time!") Func _BigTicker() ; Look for the TaskBar _Find_Taskbar($aMarquee_Coords) ; Create the banner marquee If @error Then MsgBox($MB_SYSTEMMODAL, "Error", "Could not find taskbar") Return Else Global $sText = "The ticker can be set to either the top or bottom of the display - just click on the tray icon and switch !" ; Create ticker $hBigTickerGUI = GUICreate("Big Ticker", $aMarquee_Coords[2], $aMarquee_Coords[3], $aMarquee_Coords[0], $aMarquee_Coords[1], $WS_POPUPWINDOW, $WS_EX_TOPMOST) $iMarqueeIndex = _GUICtrlMarquee_Init() _GUICtrlMarquee_SetScroll($iMarqueeIndex, 0, Default, "left", Default, 50) _GUICtrlMarquee_SetDisplay($iMarqueeIndex, 1, 0xFFFF00, 0x88CCFF, 26, "Comic Sans MS") _GUICtrlMarquee_Create($iMarqueeIndex, $sText, 0, 0, $aMarquee_Coords[2], $aMarquee_Coords[3]) GUISetState() EndIf ; Create the tray menu Opt("TrayOnEventMode", 1) ; Use event trapping for tray menu Opt("TrayMenuMode", 3) ; Default tray menu items will not be shown. ; Only add ticker position options if ticker exists If WinExists($hGUI) Then Global $hTray_Top_Item = TrayCreateItem("Top") TrayItemSetOnEvent(-1, "_Switch") Global $hTray_Bot_Item = TrayCreateItem("Bottom") TrayItemSetOnEvent(-1, "_Switch") TrayCreateItem("") EndIf TrayCreateItem("Exit") TrayItemSetOnEvent(-1, "_Exit") TraySetState() EndFunc Func _Exit() Exit EndFunc Func _Switch() ; Switch ticker position flag If $fMarquee_Pos = "top" Then $fMarquee_Pos = "bottom" Else $fMarquee_Pos = "top" EndIf ; Find taskbar position and move ticker _Find_Taskbar($aMarquee_Coords) WinMove($hBigTickerGUI, "", $aMarquee_Coords[0], $aMarquee_Coords[1], $aMarquee_Coords[2], $aMarquee_Coords[3]) EndFunc Func _Find_Taskbar(ByRef $aMarquee_Coords) ; Find taskbar and get size Local $iPrevMode = AutoItSetOption("WinTitleMatchMode", 4) Local $aTaskBar_Pos = WinGetPos("[CLASS:Shell_TrayWnd]") AutoItSetOption("WinTitleMatchMode", $iPrevMode) ; If error in finding taskbar If Not IsArray($aTaskBar_Pos) Then Return SetError(1, 0) ; Determine position of taskbar If $aTaskBar_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 - $aTaskBar_Pos[3] - 60 EndIf ElseIf $aTaskBar_Pos[0] > 0 Then ; Taskbar at RIGHT so coords of the marquee are $aMarquee_Coords[0] = 0 $aMarquee_Coords[2] = @DesktopWidth - $aTaskBar_Pos[2] If $fMarquee_Pos = "top" Then $aMarquee_Coords[1] = 0 Else $aMarquee_Coords[1] = @DesktopHeight - 60 EndIf ElseIf $aTaskBar_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] = $aTaskBar_Pos[3] Else $aMarquee_Coords[1] = @DesktopHeight - 60 EndIf ElseIf $aTaskBar_Pos[3] = @DesktopHeight Then ; Taskbar at LEFT so coords of the marquee are $aMarquee_Coords[0] = $aTaskBar_Pos[2] $aMarquee_Coords[2] = @DesktopWidth - $aTaskBar_Pos[2] If $fMarquee_Pos = "top" Then $aMarquee_Coords[1] = 0 Else $aMarquee_Coords[1] = @DesktopHeight - 60 EndIf EndIf EndFunc While 1 WEnd EDIT: Added "GUISetState(@SW_SHOW)" to no effect. I was sure that was the problem... Edited February 6, 2019 by Draygoes Spoiler "If a vegetarian eats vegetables,What the heck does a humanitarian eat?" "I hear voices in my head, but I ignore them and continue on killing." "You have forced me to raise the indifference warning to beige, it's a beige alert people. As with all beige alerts please prepare to think about the possibility of caring." An optimist says that giving someone power DOESN'T immediately turn them into a sadist. A pessimist says that giving someone power doesn't IMMEDIATELY turn them into a sadist. Link to comment Share on other sites More sharing options...
Gianni Posted February 6, 2019 Share Posted February 6, 2019 ....try remove the endless loop from lines 13 and 14 .... ... Draygoes and spudw2k 2 Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... Link to comment Share on other sites More sharing options...
Draygoes Posted February 7, 2019 Share Posted February 7, 2019 13 hours ago, Chimp said: ....try remove the endless loop from lines 13 and 14 .... ... Thank you kindly. See, I had noticed that, so I moved the loop to the bottom of the script... Spoiler "If a vegetarian eats vegetables,What the heck does a humanitarian eat?" "I hear voices in my head, but I ignore them and continue on killing." "You have forced me to raise the indifference warning to beige, it's a beige alert people. As with all beige alerts please prepare to think about the possibility of caring." An optimist says that giving someone power DOESN'T immediately turn them into a sadist. A pessimist says that giving someone power doesn't IMMEDIATELY turn them into a sadist. Link to comment Share on other sites More sharing options...
supersonic Posted February 27, 2019 Share Posted February 27, 2019 Melba23, thank you for keeping this UDF up to date! I got an error if using "MustDeclareVars" - changed line 427 to: Local $oShell = $aMarquee_Params[$iIndex][1] ... solved it. Greets, -supersonic. Link to comment Share on other sites More sharing options...
mucitbey Posted March 2, 2019 Share Posted March 2, 2019 Hello, first of all UDF is very nice, thanks for your labor. But the program does not work in win 10 rs01 v1607, or rather the scrolling text does not appear. Is there any problem that can be helpful? Thank you from now. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 2, 2019 Author Moderators Share Posted March 2, 2019 supersonic, That bug was already reported and fixed here - so I suggest you download the latest version from the OP. mucitbey, I will look into the problem. M23 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 columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
mucitbey Posted March 5, 2019 Share Posted March 5, 2019 (edited) On 2/12/2019 at 4:53 PM, Nine said: Would be useful if you could post a small snippet of your code ! I would probably go with option 2, but without any code... expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <MsgBoxConstants.au3> #include <StaticConstants.au3> #include "Marquee.au3" Local Static $iMarqueeIndex Global $hBigTickerGUI Global $aMarquee_Coords[4] = [0, 0, @DesktopWidth, 50] Global $fMarquee_Pos = "bottom" Global $iIndex = 0 Global $inif = @ScriptDir & "\sms.ini" Global $date = @MDAY &"."& @MON &"."& @YEAR Global $dDate= IniRead($inif, $date,"","Tarih bilgisi okunamadı") Global $hour= IniRead($inif, $date,'SAAT','Saat bilgisi okunamadı') Global $Mesaj=IniRead($inif, $date,'MESAJ','Mesaj bilgisi okunamadı') Global $sText = $dDate &" - "& $hour &" **** "& $Mesaj _Ticker() Func _Ticker() _Find_Taskbar($aMarquee_Coords) If @error Then MsgBox(0, "HATA", "Görev çubuğu bulunamadı") Return Else $hBigTickerGUI = GUICreate("", $aMarquee_Coords[2], $aMarquee_Coords[3], $aMarquee_Coords[0], $aMarquee_Coords[1],BitOR($WS_POPUPWINDOW,$WS_BORDER),$WS_EX_TOPMOST) $iMarqueeIndex = _GUICtrlMarquee_Init() _GUICtrlMarquee_SetScroll($iMarqueeIndex, 0, Default, "left", Default, 50) _GUICtrlMarquee_SetDisplay($iMarqueeIndex, 1, Default, 0x88CCFF, 30, "Arial") _GUICtrlMarquee_Create($iMarqueeIndex, $sText, 0, 0, $aMarquee_Coords[2], $aMarquee_Coords[3]) GUISetState() EndIf Opt("TrayOnEventMode", 1) Opt("TrayMenuMode", 3) TrayCreateItem("ÇIKIŞ") TrayItemSetOnEvent(-1, "_Exit") TraySetState() EndFunc Func _Exit() Exit EndFunc Func _Find_Taskbar(ByRef $aMarquee_Coords) Local $iPrevMode = AutoItSetOption("WinTitleMatchMode", 4) Local $aTaskBar_Pos = WinGetPos("[CLASS:Shell_TrayWnd]") AutoItSetOption("WinTitleMatchMode", $iPrevMode) If Not IsArray($aTaskBar_Pos) Then Return SetError(1, 0) If $aTaskBar_Pos[1] > 0 Then $aMarquee_Coords[0] = 0 $aMarquee_Coords[2] = @DesktopWidth If $fMarquee_Pos = "top" Then $aMarquee_Coords[1] = 0 Else $aMarquee_Coords[1] = @DesktopHeight - $aTaskBar_Pos[3] - 50 EndIf ElseIf $aTaskBar_Pos[0] > 0 Then $aMarquee_Coords[0] = 0 $aMarquee_Coords[2] = @DesktopWidth - $aTaskBar_Pos[2] If $fMarquee_Pos = "top" Then $aMarquee_Coords[1] = 0 Else $aMarquee_Coords[1] = @DesktopHeight - 50 EndIf ElseIf $aTaskBar_Pos[2] = @DesktopWidth Then $aMarquee_Coords[0] = 0 $aMarquee_Coords[2] = @DesktopWidth If $fMarquee_Pos = "top" Then $aMarquee_Coords[1] = $aTaskBar_Pos[3] Else $aMarquee_Coords[1] = @DesktopHeight - 50 EndIf ElseIf $aTaskBar_Pos[3] = @DesktopHeight Then $aMarquee_Coords[0] = $aTaskBar_Pos[2] $aMarquee_Coords[2] = @DesktopWidth - $aTaskBar_Pos[2] If $fMarquee_Pos = "top" Then $aMarquee_Coords[1] = 0 Else $aMarquee_Coords[1] = @DesktopHeight - 50 EndIf EndIf EndFunc While 1 WEnd This is my code, but there's the same problem with Marquee_Example, which is added at the beginning. There is no problem in win10 rs2 and higher versions, but rs1 Enterprise is running the program, but scrolling posts do not appear, thanks. Edited March 5, 2019 by mucitbey Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 8, 2019 Author Moderators Share Posted March 8, 2019 mucitbey, I do not have access to Win10 rs1 Enterprise, but as the marquees appear in every other flavour of Win10 on which I have tried your script I can only assume there is something in that version which prevents them from showing. However, that is a pretty old version (released August 2, 2016 according to MS) so why have you not upgraded? I am currently running rs5. Anyway, as I cannot reproduce the problem I cannot help any further - sorry. M23 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 columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
mucitbey Posted March 12, 2019 Share Posted March 12, 2019 On 3/8/2019 at 3:04 PM, Melba23 said: mucitbey, I do not have access to Win10 rs1 Enterprise, but as the marquees appear in every other flavour of Win10 on which I have tried your script I can only assume there is something in that version which prevents them from showing. However, that is a pretty old version (released August 2, 2016 according to MS) so why have you not upgraded? I am currently running rs5. Anyway, as I cannot reproduce the problem I cannot help any further - sorry. M23 Thanks Melba23,I use rs5 on my computer and there is no problem with the program. I wanted to share this problem I encountered on several computers at work. The only difference I found in the comparisons I made for the problem determination was the operating system. In the end, I think that the aim of the forum is to develop better programs by identifying the problems encountered. Thank you for your effort. Link to comment Share on other sites More sharing options...
Inpho Posted April 26, 2019 Share Posted April 26, 2019 (edited) Hey Melba, Thanks for another useful UDF. I have one small niggly issue. Is there any way of making the gap between scrolls shorter? At the moment, I have to wait for the current text to completely disappear before the new text starts scrolling. I'm pretty confident that this is going to be a rtfm issue and I already feel silly that I can't figure this... Tried playing with params in the With loop in _GUICtrlMarquee_Create() but no luck. Edited April 27, 2019 by Inpho Removed screenshots Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted April 26, 2019 Author Moderators Share Posted April 26, 2019 Inpho, Alas this is a limitation of the MS object used to create the marquee. I too would love to be able to reduce that annoying gap, but I have not been able to do it so far. M23 Inpho 1 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 columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Inpho Posted April 27, 2019 Share Posted April 27, 2019 (edited) I started to get somewhere with embedding a marquee into each of two child guis and moving/resizing the guis in line with the scrolling. Will be something to wake me up gently on Monday morning. Edited April 27, 2019 by Inpho Link to comment Share on other sites More sharing options...
Efo74 Posted June 27, 2020 Share Posted June 27, 2020 Strange Problem with this UDF. Can Someone help me ? I have make 3 forms, when I launch my program I open form 1, form 2, form 3 and then after close form 3, a scroll text in the second form should display. It does not works. When I launch directly form 2 without form 1 it works, or when I launch form 1,2 without form 3 it works. Thank you for the Help ... this is the code: expandcollapse popup#include <GUIConstants.au3> #include <ColorConstants.au3> #include <Marquee.au3> frm_11111() ;frm_22222() ;****************************************************************************************************************************************************************************** Func frm_11111() ;***************************************************************************************************************************************************************************** $frm_11111 = GUICreate("11111",800,500) GUISetState() $TestForm = True While True $nMsg = GUIGetMsg() if $nMsg = $GUI_EVENT_CLOSE Then ExitLoop if $TestForm = True Then $TestForm = False frm_22222() EndIf Sleep(15) Wend EndFunc ;***************************************************************************************************************************************************************************** Func frm_22222() ;***************************************************************************************************************************************************************************** $frm_22222 = GUICreate("22222",400,500) GUISetState() $Execute_ScrollActivity = True While True $nMsg = GUIGetMsg() if $nMsg = $GUI_EVENT_CLOSE Then ExitLoop if $Execute_ScrollActivity = True Then $Execute_ScrollActivity = False frm_33333() ;if this line is commented (no form) the scroll works $iMarqueeControl = _GUICtrlMarquee_Init() _GUICtrlMarquee_SetScroll($iMarqueeControl, Default, "scroll", "left", 3) _GUICtrlMarquee_SetDisplay($iMarqueeControl, 0, $COLOR_BLACK,$COLOR_RED, 12) $retval = _GUICtrlMarquee_Create($iMarqueeControl,"working scroll", 147, 252, 131, 21) MsgBox(0,"Error: " & @error,"Retval: " & $retval) EndIf Sleep(15) WEnd GUIDelete($frm_22222) EndFunc ;****************************************************************************************************************************************************************************** Func frm_33333() ;****************************************************************************************************************************************************************************** $frm_33333 = GUICreate("333333",250,100) GUISetState() While True $nMsg = GUIGetMsg() if $nMsg = $GUI_EVENT_CLOSE Then ExitLoop Sleep(15) WEnd GUIDelete($frm_33333) EndFunc :rolleyes: Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 28, 2020 Author Moderators Share Posted June 28, 2020 Efo74, In your script the last-created GUI is $frm_33333, so when you try and create the Marquee control AutoIt uses that internally stored handle as the parent. But you have deleted the GUI and so there is no valid parent GUI for the control - hence it cannot be created in $frm_33333. And as there are still 2 other GUIs in existence, Autoit does not know which of them you wish to hold the new control and so refuses to create it in either. As a result, the control is not created at all! Add a GUISwitch($frm_22222) line just before the calls to the UDF and then AutoIt will realise which GUI to use as parent and your Marquee will appear. Incidentally, you do not need to use a Sleep in a loop which also contains a GUIGetMsg call - that function has a built-in sleep as explained in the Help file. M23 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 columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Efo74 Posted June 28, 2020 Share Posted June 28, 2020 Thanks Melba for your valuable help, now it works properly ... I hit my head with a thousand tests to try to make it work, but without success. Thanks also for the suggestion of Sleep (), (I thought I was doing well) ... I am an inexperienced programmer, I do not do it by profession, but mainly as a hobby. Thanks to people like you, even a 22:00 o'clock programmer can make some nice projects. :rolleyes: Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now