Rogue5099 Posted March 26, 2012 Share Posted March 26, 2012 When using the Marquee I noticed you can change the text by using html so I added this line and it doesn't go to site: '<center><a href="http://www.autoitscript.com/" target="_blank">AutoIt</a><br><br>AutoIt: endless possibilities!</center>' My projects: Inventory / Mp3 Inventory, Computer Stats Link to comment Share on other sites More sharing options...
Rogue5099 Posted March 30, 2012 Share Posted March 30, 2012 I found out my problem from above by removing "onclick="return falsed" it allows the link to go through. Now I just want to add a background image. I know I can do that by the following running the .au3 but when Compiled the resource isn't loading. I have looked at GDI_Plus.... stuff but am unable to figure out how to insert a $hBitmap into $oShell Object... I know that ResourceGet() from Zedna returns hBitmap using RT_BITMAP. I just don't know how to insert that into $oShell from the Marquee.#AutoIt3Wrapper_Res_File_Add=CITS.bmp, rt_bitmap, BACKGROUND With $oShell.document If @Compiled Then $Bitmap = _ResourceGet("BACKGROUND", $rt_bitmap) Else $Bitmap = @ScriptDir & "CITS.bmp" EndIf .write('<style>marquee{cursor: default}></style>') .write('<body background="' & $Bitmap & '" onselectstart="return false" oncontextmenu="return false" ondragstart="return false" ondragover="return false">') .writeln('<marquee width=100% height=100%') .writeln("loop=" & $iMarquee_Loop) .writeln("behavior=" & $sMarquee_Move) .writeln("direction=" & $sMarquee_Direction) .writeln("scrollamount=" & $iMarquee_Scroll) .writeln("scrolldelay=" & $iMarquee_Delay) .write(">") .write($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 My projects: Inventory / Mp3 Inventory, Computer Stats Link to comment Share on other sites More sharing options...
Rogue5099 Posted April 7, 2012 Share Posted April 7, 2012 (edited) Found Solution to adding image to background of marquee. Just upload image to a site i.e. TinyPic then just insert url like so: .write('<body background="http://www.tinypicurl.com/img.jpg" onselectstart="return false" oncontextmenu="return false" ondragstart="return false" ondragover="return false">') Edited April 7, 2012 by rogue5099 My projects: Inventory / Mp3 Inventory, Computer Stats Link to comment Share on other sites More sharing options...
Belini Posted August 25, 2012 Share Posted August 25, 2012 (edited) @Melba23 to change the text have to recreate the control, you could put the function _GUICtrlMarquee_SetData? _GUICtrlMarquee_SetScroll : Sets movement parameters for Marquee_GUICtrlMarquee_SetDisplay : Sets display parameters for Marquee_GUICtrlMarquee_Create : Creates Marquee_GUICtrlMarquee_SetData : change the text Edited August 25, 2012 by Belini My Codes: Virtual Key Code UDF: http://www.autoitscript.com/forum/topic/138246-virtual-key-code-udf/ GuiSplashTextOn.au3: http://www.autoitscript.com/forum/topic/143542-guisplashtexton-udf/ Menu versions of Autoit: http://www.autoitscript.com/forum/topic/137435-menu-versions-of-autoit/#entry962011 Selects first folder of letters: ]http://www.autoitscript.com/forum/topic/144780-select-folders-by-letter/#entry1021708/spoiler] List files and folders with long addresses.: http://www.autoitscript.com/forum/topic/144910-list-files-and-folders-with-long-addresses/#entry102 2926 Program JUKEBOX made in Autoit:some functions:http://www.youtube.com/watch?v=WJ2tC2fD5Qs Navigation to search:http://www.youtube.com/watch?v=lblwOFIbgtQ Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 26, 2012 Moderators Share Posted August 26, 2012 Belini,to change the text have to recreate the control, you could put the function _GUICtrlMarquee_SetData?I could indeed - if I had any idea of how to do it! I will take a look, but if you have any suggestions I am all ears. 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...
rover Posted August 26, 2012 Share Posted August 26, 2012 (edited) @Melba23 to change the text have to recreate the control, you could put the function _GUICtrlMarquee_SetData? Perhaps Dale Hohm knows if the text can be replaced without resetting the scroll position. A standalone example with a modified __GUICtrlMarquee_Create and Marquee.au3 include excluded expandcollapse popup;#include <Marquee.au3> 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 Global $oShell_1 GUICreate("Marquee Example", 320, 220) __GUICtrlMarquee_Create($oShell_1, "Default Marquee Parameters", 10, 10, 300, 20) GUISetState() Sleep(6000) __GUICtrlMarquee_SetText($oShell_1, "New Marquee Text") While 1 If GUIGetMsg() = -3 Then Exit WEnd Func __GUICtrlMarquee_Create(ByRef $oShell, $sText, $iLeft, $iTop, $iWidth, $iHeight, $sTipText = "") ; Declare Local variables Local $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("about:blank") While $oShell.busy Sleep(100) WEnd With $oShell.document .write('<style>marquee{cursor: default}></style>') .write('<body onselectstart="return false" oncontextmenu="return false" onclick="return false" ondragstart="return false" ondragover="return false">') .writeln('<marquee width=100% height=100%') .writeln("loop=" & $iMarquee_Loop) .writeln("behavior=" & $sMarquee_Move) .writeln("direction=" & $sMarquee_Direction) .writeln("scrollamount=" & $iMarquee_Scroll) .writeln("scrolldelay=" & $iMarquee_Delay) .write(">") .write($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 Func __GUICtrlMarquee_SetText(ByRef $oShell, $sText) If Not IsObj($oShell) Then Return SetError(1, 0, -1) $oShell.document.body.innerHTML = '<body onselectstart="return false" oncontextmenu="return false" onclick="return false" ondragstart="return false" ondragover="return false"> ' & _ '<marquee width=100% height=100% ' & "loop=" & $iMarquee_Loop & " behavior=" & $sMarquee_Move & " direction=" & $sMarquee_Direction & " scrollamount=" & $iMarquee_Scroll & _ " scrolldelay=" & $iMarquee_Delay & ">" & $sText EndFunc ;=> __GUICtrlMarquee_SetText Edited August 26, 2012 by rover I see fascists... Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 26, 2012 Moderators Share Posted August 26, 2012 rover,Thanks for that - I can see how to incorporate that into a UDF. And I will need to add a _GUICtrlMarquee_Delete function as well - so thanks for that too. 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...
Moderators Melba23 Posted August 27, 2012 Moderators Share Posted August 27, 2012 And the new UDF can be found here. 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...
Belini Posted August 27, 2012 Share Posted August 27, 2012 Great changes made, thank you @ Melba23 and @Rover. My Codes: Virtual Key Code UDF: http://www.autoitscript.com/forum/topic/138246-virtual-key-code-udf/ GuiSplashTextOn.au3: http://www.autoitscript.com/forum/topic/143542-guisplashtexton-udf/ Menu versions of Autoit: http://www.autoitscript.com/forum/topic/137435-menu-versions-of-autoit/#entry962011 Selects first folder of letters: ]http://www.autoitscript.com/forum/topic/144780-select-folders-by-letter/#entry1021708/spoiler] List files and folders with long addresses.: http://www.autoitscript.com/forum/topic/144910-list-files-and-folders-with-long-addresses/#entry102 2926 Program JUKEBOX made in Autoit:some functions:http://www.youtube.com/watch?v=WJ2tC2fD5Qs Navigation to search:http://www.youtube.com/watch?v=lblwOFIbgtQ 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