#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Res_Comment=Marquee Maker with HTML 5.0 mods #AutoIt3Wrapper_Res_Description=Marquee Maker provides easy access to display fully configurable scrolling, stationary or alternating messages onscreen. #AutoIt3Wrapper_Res_Fileversion=1.0.0.0 #AutoIt3Wrapper_Res_Fileversion_AutoIncrement=p #AutoIt3Wrapper_Res_LegalCopyright=Copyright CashFlowProducts.com - All Rights Reserved #AutoIt3Wrapper_Res_Language=1033 #AutoIt3Wrapper_Run_Tidy=y #AutoIt3Wrapper_Run_Au3Stripper=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include #include #include #include #include ; #PROGRAM# ==================================================================================================================== ; Name...........: Marquee Maker ; Description ...: GUI Interface to set parameters for a Marquee, preview it, and create code automatically ; Syntax.........: N/A ; Parameters ....: N/A ; Return values .: N/A (created code is opened in Notepad) ; Author ........: TechCoder (TechCoder at CashFlowProducts dot com) ; Related .......: Marquee.au3 by Melba23 or Marquee_W3C.au3 (required to access all the features) ; Link ..........; ; Example .......; Yes - self contained program (in addition, example code is generated by the program) ; =============================================================================================================================== ; ******************************************************************************************************************************* ; ; IN ORDER TO ACCESS ALL THE FEATURES OF THIS PROGRAM, YOU MUST USE Marquee_W3C.au3 UDF! ; ; ******************************************************************************************************************************* ; has been classed as "non-standard" and "non-conforming" as an HTML element ; (http://www.w3.org/wiki/HTML/Elements/marquee) ; However, it has use in various AutoIt programs - and a nice UDF from Melba23! ; ; For a project I'm working on, I need a way to create a LOT of different marquees, so ; I thought it simpler to have a program to create the code needed, and built this ; 'user interface' using various references to the feature (originally built ; into Internet Explorer only, now supported in other browsers, though some original features ; do not work in IE either {it is clearly being phased out, though hopefully not soon!) ; ; I also needed some features that are not part of the UDF from Melba23 that are ; direct references to current (HTML5) recommendations from http://www.w3.org/TR/CSS2/, so ; I built an addition to the UDF to create the additional functions, which make the UDF somewhat ; more HTML5 compliant (some new features have no HTML5 component, existing functions updated ; only where needed for the first release - perhaps someday the rest can be done, though no plans) ; ******************************************************************************************************************************* ; ; Additional recommendations from w3.org built into Marquee_W3C.au3 UDF ; ; 1. Border thickness (width) refered as "thin", "medium" and "thick" or (any number - to infinity) ; (http://www.w3.org/TR/CSS2/box.html#border-properties) ; (http://www.w3schools.com/jsref/prop_style_borderwidth.asp) ; the Marquee_W3C UDF allows any number as an entry, as well as the more 'friendly' named terms ; ; 2. 'Border Style' is included in the Marquee_W3C UDF (not in the current UDF, therefore, none of the settings in ; this program do anything if you use the old UDF, so it is set to $GUI_DISABLE.) ; ; 3. use of PIXELS and EM for formatting text instead of POINTS ; http://www.w3.org/TR/CSS2/fonts.html#font-size-props use paramaters ; http://www.w3.org/TR/CSS2/syndata.html#value-def-length with named length units (em, ex, cm, in, px, etc.) ; POINTS are used in typsetting, while PIXELS, and EM are more correct methods of sizing ; fonts on modern monitors (one good article on this topic can be found at ; http://webdesign.about.com/cs/typemeasurements/a/aa042803a.htm) ; ; NOTE: This program is backward compatible with the UDF from Melba23 that uses POINTS ; and auto-sets the parameter with the chosen UDF. ; ; ******************************************************************************************************************************* ; ; KNOWN ISSUES and/or LIMITATIONS within the program ; ; - Tip text NOT IMPLEMENTED (from _GUICtrlMarquee_SetDisplay $sTipTxt) ; ; - border styles do not correspond to w3.org settings (not the program's fault...) ; This article (http://webdesign.about.com/od/beginningcss/a/aa091207.htm) states that IE does not support ; 'groove', 'ridge', 'inset' or 'outset' styles, yet does support 'dotted', 'dashed' and 'double'. ; Testing has proven this is true for IE (11), however, in testing AutoIt (with the Marquee UDF), which I thought uses IE (?), ; it appears that just the OPPOSITE of this is true. Another item for further testing/study......... ; ; - 'Align' feature not working 100% on all fonts (not the program's fault! ;) ; the initial version of (designed for IE and copied to other browsers later) contained an element called ; 'align', which has long been obsolete in favor of css 'vertical-align', however, it is not a direct replacement ; and does not work inside . Several alternatives were tried (including 'line-height' and even 'vspace', which ; may also soon be phased out) and nothing works 'perfectly' (search the web on font sizing and spacing - you will see this ; is extremely difficult). ; This program works around these challenges in a 'best effort' way, using calculations and 'top-margin' (or vspace) spacing. ; 'Recommended' fonts (http://www.autoitscript.com/autoit3/docs/appendix/fonts.htm) will be set to 'center' or 'bottom' ; (within a pixel or 2), while other fonts may be off by several pixels (something in the font is different..). ; If you need the other fonts, a bit of testing would give some offset numbers that could result in better display. ; (this is NOT on my list to do, though maybe someone would want to take that on???) ; ; - You can create 'unreadable', 'unusable' and even 'UGLY' marquees (not the program's fault, either!) ; While a bit of effort was put into limiting things, there is no cross-checking to make sure your marquee will look 'nice' ; All parameters within the marquee feature have been tested to their max/min limits (and pushed well past the documented limits ; for speed and delay - you can make a F A S T or S L O W marquee well outside the published specs!) and set accordingly. ; Any/all color scheme, font size, etc. can be used (no matter how horrible the outcome...) so have fun and create what you like! ; ; ******************************************************************************************************************************* ; ; IN ORDER TO ACCESS ALL THE FEATURES OF THIS PROGRAM, YOU MUST USE Marquee_W3C.au3 UDF! ; ; ******************************************************************************************************************************* ;#include ; TO USE Melba23's UDF - 1. uncomment the above line 2. comment out the next line 3. set $useW3C = 0 below #include "Marquee_W3C.au3" Global $useW3C = 1 ; ******************************************************************************************************************************* ; ; IN ORDER TO ACCESS ALL THE FEATURES OF THIS PROGRAM, YOU MUST USE Marquee_W3C.au3 UDF! ; ; ******************************************************************************************************************************* Local $arraysize = $useW3C ? 16 : 13 ; set Global variables Global $hGUI = 0 Global $aMarquee, $aMarqueeParams[$arraysize], $displaystring ; set Local variables Local $guiwidth = 500, $guiheight = 300, $hMGUI Local $leftmargin = 10, $rightmargin = 10, $topmargin = 10, $bottommargin = 10 Local $horizontal, $vertical, $hspace = 10, $vspace = 5, $holdh, $holdv Local $labelwidth = 20, $labelheight = 20, $labeloffset = 3, $comboboxheight = 25 ; set variables for the controls Local $Mtext, $Mfont, $Mfontsize, $Mfontcolor, $Mbackgroundcolor Local $Mdirectionleft, $Mdirectioncenter, $Mdirectionright, $Mdirectionup, $Mdirectiondown Local $Mspeeddelay, $Mspeedamount, $Mscroll, $Mslide, $Malternate Local $Maligntop, $Malignmiddle, $Malignbottom Local $Mwidth, $Mwidthpixel, $Mwidthpercent, $Mheight, $Mheightpixel, $Mheightpercent Local $Mrepeatcont, $Mrepeattimes, $Mrepeatlabel Local $Mborderonoff, $Mborderstyle, $Mborderwidth, $Mbordercolor Local $MSeeIt, $Monscreen, $MCreateCode ; create the GUI $hGUI = GUICreate("Marquee Maker - by TechCoder", $guiwidth, $guiheight) $horizontal = $leftmargin $vertical = $topmargin ; create a focus box (group) GUICtrlCreateGroup("", $horizontal, $vertical, $guiwidth - $leftmargin - $rightmargin, $guiheight - $topmargin - $bottommargin) ; create a Group to create break lines (for looks only) GUICtrlCreateGroup("", $horizontal, $vertical, $guiwidth - $leftmargin - $rightmargin, 100) $horizontal = $leftmargin + $hspace $vertical = $topmargin + $vspace * 3 $holdh = $horizontal $holdv = $vertical ; create area for entering text GUICtrlCreateLabel("Text", $horizontal, $vertical + $labeloffset, $labelwidth, $labelheight) $horizontal += $hspace + $labelwidth $Mtext = GUICtrlCreateInput("", $horizontal, $vertical, 330, $labelheight) $horizontal += 330 + $hspace GUICtrlSetData($Mtext, "Your TEXT Goes Here") ; create a 'Create It' button $MSeeIt = GUICtrlCreateButton("See It!", $horizontal, $vertical, 90, $labelheight * 1.8) $vertical += $labelheight * 1.8 + $vspace ;$MResetDefault = GUICtrlCreateButton("Reset (Default)", $horizontal, $vertical, 90, $labelheight * 1.8) $MCreateCode = GUICtrlCreateButton("Create Code", $horizontal, $vertical, 90, $labelheight * 1.8) $horizontal = $holdh $vertical = $holdv + $vspace + $labelheight ; create Font GUICtrlCreateLabel("Font", $horizontal, $vertical + $labeloffset, $labelwidth, $labelheight) $horizontal += 10 + $labelwidth $Mfont = GUICtrlCreateCombo("", $horizontal, $vertical, 140, $comboboxheight) GUICtrlSetData(-1, "Consolas|Courier|Courier New|Lucinda Console|Cambria Math|Marlett|Segoe UI Symbol|Symbol|Webdings|Wingdings|Ariel|Ariel Black|Calibri|Cambria|Candara|Comic Sans MS|Constantia|Corbel|Estrangelo Edessa|Franklin Gothic Medium|Gabriola|Gautami|Georgia|Impact|Latha|Lucida Sans Unicode|MS Sans Serif|MS Serif|MV Boli|Myanmar Text|Nyala|Palatino Linotype|Plantagenet Cherokee|Roman|Script|Segoe Print|Segoe Script|Segoe UI|Small Fonts|Sylfaen|Tahoma|Times New Roman|Trebuchet MS|Tunga|Verdana", "") $horizontal += 140 + $hspace ; create Size GUICtrlCreateLabel($useW3C ? "Pixels" : "Size", $horizontal, $vertical + $labeloffset, $labelwidth + 7, $labelheight) $horizontal += $hspace + $labelwidth $Mfontsize = GUICtrlCreateInput('', $horizontal, $vertical, 45, $labelheight) GUICtrlCreateUpdown(-1) GUICtrlSetLimit(-1, $useW3C ? @DesktopHeight : 92, 1) $horizontal += $hspace + 45 ; create Font Color GUICtrlCreateLabel("Color", $horizontal, $vertical + $labeloffset, $labelwidth + 5, $labelheight) $horizontal += $hspace + $labelwidth $Mfontcolor = GUICtrlCreateCombo("", $horizontal, $vertical, 65, $comboboxheight) GUICtrlSetData(-1, "Aqua|Black|Blue|Fuchsia|Gray|Green|Lime|Maroon|Navy|Olive|Purple|Red|Silver|Teal|White|Yellow", "") $horizontal = $leftmargin + $hspace $vertical += $vspace + $comboboxheight ; create Background Color GUICtrlCreateLabel("Background Color", $horizontal, $vertical + $labeloffset, $labelwidth * 5, $labelheight) $horizontal += $labelwidth * 4 + $hspace + 5 $Mbackgroundcolor = GUICtrlCreateCombo("", $horizontal, $vertical, 75, $comboboxheight) GUICtrlSetData(-1, "Aqua|Black|Blue|Fuchsia|Gray|Green|Lime|Maroon|Navy|Olive|Purple|Red|Silver|Teal|White|Yellow", "") $horizontal += 75 + $hspace ; create Repeat (LOOP) Controls GUICtrlCreateLabel("Repeat", $horizontal, $vertical + $labeloffset, $labelwidth * 2, $comboboxheight * 1.8) $horizontal += $labelwidth * 2 $Mrepeatcont = GUICtrlCreateCheckbox("Continuously", $horizontal, $vertical, $labelwidth * 4, $labelheight) $horizontal += $hspace * 2 + $labelwidth * 3 $Mrepeattimes = GUICtrlCreateInput("", $horizontal, $vertical, 30, $labelheight) $horizontal += 30 + $hspace / 4 $Mrepeatlabel = GUICtrlCreateLabel("Times", $horizontal, $vertical + $labeloffset, 35, $labelheight) $horizontal = $leftmargin + $hspace / 2 $holdh = $horizontal $vertical += $vspace + $comboboxheight $holdv = $vertical ; start of 'Look' group, though no Group is formed (looks better and less code using the outer Group for lines) ; create Behavior GUICtrlCreateGroup("Behavior", $horizontal, $vertical, $labelwidth * 5, $comboboxheight * 3.8) $horizontal += $hspace * 2 $vertical += $vspace * 3 $Mscroll = GUICtrlCreateRadio("Scroll", $horizontal, $vertical, $labelwidth * 3, $labelheight) $vertical += $vspace + $labelheight $Mslide = GUICtrlCreateRadio("Slide", $horizontal, $vertical, $labelwidth * 3, $labelheight) $vertical += $vspace + $labelheight $Malternate = GUICtrlCreateRadio("Alternate", $horizontal, $vertical, $labelwidth * 3, $labelheight) $horizontal = $holdh + $labelwidth * 5 $vertical = $holdv $holdh = $horizontal ; create Direction GUICtrlCreateGroup("Direction", $horizontal, $vertical, $labelwidth * 7.6, $comboboxheight * 3.8) $horizontal += ($labelwidth * 7.6) / 2 - 9 $vertical += $vspace * 3 $Mdirectionup = GUICtrlCreateCheckbox("U", $horizontal, $vertical, $labelwidth * 3, $labelheight) $horizontal = $holdh + $hspace * 2 $vertical += $vspace + $labelheight GUICtrlCreateLabel("L", $horizontal, $vertical + $labeloffset, 10, $labelheight) $horizontal += 10 $Mdirectionleft = GUICtrlCreateRadio("<----", $horizontal, $vertical, $labelwidth * 1.7, $labelheight) $horizontal += $hspace + $labelwidth * 1.5 $Mdirectioncenter = GUICtrlCreateRadio("---->", $horizontal, $vertical, $labelwidth * 1.7, $labelheight) $horizontal += $hspace + $labelwidth * 1.5 $Mdirectionright = GUICtrlCreateRadio("R", $horizontal, $vertical, $labelwidth * 2, $labelheight) $horizontal = $holdh + ($labelwidth * 7.6) / 2 - 9 $vertical += $vspace + $labelheight $Mdirectiondown = GUICtrlCreateCheckbox("D", $horizontal, $vertical, $labelwidth * 3, $labelheight) $horizontal = $holdh + $labelwidth * 8 - 8 $vertical += 35 $vertical = $holdv ; create Speed GUICtrlCreateGroup("Speed", $horizontal, $vertical, $labelwidth * 5 + $hspace * 2 - 2, $comboboxheight * 3.8) $horizontal += $hspace * 2 $holdh = $horizontal $vertical += $vspace * 5 GUICtrlCreateLabel("Move", $horizontal, $vertical + $labeloffset, $labelwidth + 10, $comboboxheight) $horizontal += $labelwidth + 10 $Mspeedamount = GUICtrlCreateInput("", $horizontal, $vertical, 40, $labelheight) GUICtrlCreateUpdown(-1) GUICtrlSetLimit(-1, 999, 0) $vertical += $vspace + 30 $horizontal = $holdh GUICtrlCreateLabel("Delay", $horizontal, $vertical + $labeloffset, $labelwidth + 10, $comboboxheight) $horizontal += $labelwidth + $hspace $Mspeeddelay = GUICtrlCreateInput("", $horizontal, $vertical, 40, $labelheight) GUICtrlCreateUpdown(-1) GUICtrlSetLimit(-1, 999, 0) $horizontal = $guiwidth - $labelwidth * 5 - $rightmargin - 5 $vertical = $holdv ; create Align GUICtrlCreateGroup("Align", $horizontal, $vertical, $labelwidth * 5, $comboboxheight * 3.8) $horizontal += $hspace * 2 $vertical += $vspace * 3 $Maligntop = GUICtrlCreateRadio("Top", $horizontal, $vertical, $labelwidth * 3, $labelheight) $vertical += $vspace + $labelheight $Malignmiddle = GUICtrlCreateRadio("Middle", $horizontal, $vertical, $labelwidth * 3, $labelheight) $vertical += $vspace + $labelheight $Malignbottom = GUICtrlCreateRadio("Bottom", $horizontal, $vertical, $labelwidth * 3, $labelheight) $horizontal = $leftmargin $vertical = 200 ; create a Size group GUICtrlCreateGroup("", $horizontal, $vertical, $guiwidth - $leftmargin - $rightmargin, $guiheight - $vertical - $bottommargin) $horizontal = $leftmargin + $hspace / 2 $vertical += 10 GUICtrlCreateGroup("Frame", $horizontal, $vertical, $guiwidth - $leftmargin - $rightmargin - $hspace, 80 - $vspace) $horizontal += $hspace $holdh = $horizontal $vertical += $vspace * 3 GUICtrlCreateLabel("Width", $horizontal, $vertical + $labeloffset, $labelwidth * 2, $labelheight) $horizontal += $labelwidth * 2 $Mwidthpixel = GUICtrlCreateInput("", $horizontal, $vertical, $labelwidth * 2, $labelheight) GUICtrlCreateUpdown(-1) GUICtrlSetLimit(-1, 100, 1) $horizontal += $labelwidth * 2 $Mwidthpercent = GUICtrlCreateCombo("", $horizontal, $vertical, $labelwidth * 5, $labelheight) GUICtrlSetData(-1, "Pixels|% of Desktop", "") $horizontal += $hspace * 3 + $labelwidth * 5 GUICtrlCreateLabel("Height", $horizontal, $vertical + $labeloffset, $labelwidth * 2, $labelheight) $horizontal += $labelwidth * 2 $Mheightpixel = GUICtrlCreateInput("", $horizontal, $vertical, $labelwidth * 2, $labelheight) GUICtrlCreateUpdown(-1) GUICtrlSetLimit(-1, 100, 1) $horizontal += $labelwidth * 2 $Mheightpercent = GUICtrlCreateCombo("", $horizontal, $vertical, $labelwidth * 5, $labelheight) GUICtrlSetData(-1, "Pixels|% of Desktop", "Pixels") $horizontal = $holdh $vertical += $labelheight + $vspace ; create a Border group GUICtrlCreateLabel("Border", $horizontal, $vertical + $labeloffset, $labelwidth * 2, $labelheight) $horizontal += $labelwidth * 2 $Mborderonoff = GUICtrlCreateCheckbox("", $horizontal, $vertical, $labelwidth, $labelheight) $horizontal += $labelwidth + 10 Local $stylelabel = GUICtrlCreateLabel("Style", $horizontal, $vertical + $labeloffset, $labelwidth + 8, $labelheight) $horizontal += $labelwidth + 8 $Mborderstyle = GUICtrlCreateCombo("", $horizontal, $vertical, $labelwidth * 4, $labelheight) GUICtrlSetData(-1, "Solid|Dotted|Dashed|Double|Groove|Ridge|Inset|Outset", "Solid") $horizontal += $hspace / 2 + $labelwidth * 4 GUICtrlCreateLabel("Thickness", $horizontal, $vertical + $labeloffset, $labelwidth * 2.7, $labelheight) $horizontal += $labelwidth * 2.7 $Mborderwidth = GUICtrlCreateCombo("", $horizontal, $vertical, $labelwidth * 3, $labelheight) ; (CSS Shortcuts and numbers 1-10 only - numbers to infinite makes no sense...) GUICtrlSetData(-1, "|Thin|Medium|Thick|1|2|3|4|5|6|7|8|9|10", "") $horizontal += $labelwidth * 3 + $hspace * 2 / 3 GUICtrlCreateLabel("Color", $horizontal, $vertical + $labeloffset, $labelwidth + 10, $labelheight) $horizontal += $labelwidth + 10 $Mbordercolor = GUICtrlCreateCombo("", $horizontal, $vertical, 75, $comboboxheight) GUICtrlSetData(-1, "Aqua|Black|Blue|Fuchsia|Gray|Green|Lime|Maroon|Navy|Olive|Purple|Red|Silver|Teal|White|Yellow", "") ; set default selections _set_defaults() GUISetState(@SW_SHOW) While 1 $hMsg = GUIGetMsg() If $hMsg > 1 Then If BitAND(GUICtrlRead($Mdirectionup), GUICtrlRead($Mdirectiondown), $GUI_UNCHECKED) = $GUI_UNCHECKED And _ BitAND(GUICtrlRead($Mdirectioncenter), $GUI_CHECKED) = $GUI_CHECKED Then GUICtrlSetState($Mscroll, $GUI_DISABLE) GUICtrlSetState($Mslide, $GUI_DISABLE) GUICtrlSetState($Malternate, $GUI_DISABLE) Else GUICtrlSetState($Mscroll, $GUI_ENABLE) GUICtrlSetState($Mslide, $GUI_ENABLE) GUICtrlSetState($Malternate, $GUI_ENABLE) EndIf ; set 'Move' $aMarqueeParams[3] If BitAND(GUICtrlRead($Mscroll), $GUI_CHECKED) = $GUI_CHECKED Then $aMarqueeParams[3] = "scroll" ElseIf BitAND(GUICtrlRead($Mslide), $GUI_CHECKED) = $GUI_CHECKED Then $aMarqueeParams[3] = "slide" Else $aMarqueeParams[3] = "alternate" EndIf ; set 'Direction' $aMarqueeParams[4] If BitAND(GUICtrlRead($Mdirectionup), $GUI_CHECKED) = $GUI_CHECKED Then $aMarqueeParams[4] = "up" If $useW3C Then If BitAND(GUICtrlRead($Mdirectionleft), $GUI_CHECKED) = $GUI_CHECKED Then $aMarqueeParams[12 + 3] = "left" ElseIf BitAND(GUICtrlRead($Mdirectioncenter), $GUI_CHECKED) = $GUI_CHECKED Then $aMarqueeParams[12 + 3] = "center" Else $aMarqueeParams[12 + 3] = "right" EndIf EndIf ElseIf BitAND(GUICtrlRead($Mdirectiondown), $GUI_CHECKED) = $GUI_CHECKED Then $aMarqueeParams[4] = "down" If $useW3C Then If BitAND(GUICtrlRead($Mdirectionleft), $GUI_CHECKED) = $GUI_CHECKED Then $aMarqueeParams[12 + 3] = "left" ElseIf BitAND(GUICtrlRead($Mdirectioncenter), $GUI_CHECKED) = $GUI_CHECKED Then $aMarqueeParams[12 + 3] = "center" Else $aMarqueeParams[12 + 3] = "right" EndIf EndIf ElseIf BitAND(GUICtrlRead($Mdirectionleft), $GUI_CHECKED) = $GUI_CHECKED Then $aMarqueeParams[4] = "left" If BitAND(GUICtrlRead($Maligntop), $GUI_CHECKED) = $GUI_CHECKED Then $aMarqueeParams[12 + 3] = "top" ElseIf BitAND(GUICtrlRead($Malignmiddle), $GUI_CHECKED) = $GUI_CHECKED Then $aMarqueeParams[12 + 3] = "middle" Else $aMarqueeParams[12 + 3] = "bottom" EndIf ElseIf BitAND(GUICtrlRead($Mdirectioncenter), $GUI_CHECKED) = $GUI_CHECKED Then $aMarqueeParams[4] = "center" If BitAND(GUICtrlRead($Maligntop), $GUI_CHECKED) = $GUI_CHECKED Then $aMarqueeParams[12 + 3] = "top" ElseIf BitAND(GUICtrlRead($Malignmiddle), $GUI_CHECKED) = $GUI_CHECKED Then $aMarqueeParams[12 + 3] = "middle" Else $aMarqueeParams[12 + 3] = "bottom" EndIf Else $aMarqueeParams[4] = "right" If BitAND(GUICtrlRead($Maligntop), $GUI_CHECKED) = $GUI_CHECKED Then $aMarqueeParams[12 + 3] = "top" ElseIf BitAND(GUICtrlRead($Malignmiddle), $GUI_CHECKED) = $GUI_CHECKED Then $aMarqueeParams[12 + 3] = "middle" Else $aMarqueeParams[12 + 3] = "bottom" EndIf EndIf ; set 'Speed Amount' $aMarqueeParams[5] $aMarqueeParams[5] = GUICtrlRead($Mspeedamount) ; set 'Speed Delay' $aMarqueeParams[6] $aMarqueeParams[6] = GUICtrlRead($Mspeeddelay) ; set 'Border' $aMarqueeParams[7] $aMarqueeParams[7] = StringIsDigit(GUICtrlRead($Mborderwidth)) ? Number(GUICtrlRead($Mborderwidth)) : StringLower(GUICtrlRead($Mborderwidth)) ; set 'Font Color' $aMarqueeParams[8] $aMarqueeParams[8] = color_picker(GUICtrlRead($Mfontcolor, 1)) ; set 'Background Color' $aMarqueeParams[9] $aMarqueeParams[9] = color_picker(GUICtrlRead($Mbackgroundcolor, 1)) ; set 'Font Size' $aMarqueeParams[10] $aMarqueeParams[10] = GUICtrlRead($Mfontsize) ; for backward compatibility with Melba23's UDF If Not $useW3C Then $aMarqueeParams[10] = Int(Abs(GUICtrlRead($Mfontsize))) EndIf ; set 'Font' $aMarqueeParams[11] $aMarqueeParams[11] = GUICtrlRead($Mfont) ; set 'Text' $aMarqueeParams[12] $aMarqueeParams[12] = GUICtrlRead($Mtext) If $useW3C Then ; (AutoIt creates an error when using the original UDF, so we have to add numbers to work around it) If BitAND(GUICtrlRead($Mborderonoff), $GUI_CHECKED) = $GUI_CHECKED Then ; set 'Border Style' $aMarqueeParams[13] $aMarqueeParams[12 + 1] = GUICtrlRead($Mborderstyle) ; set 'Border Color' $aMarqueeParams[14] $aMarqueeParams[12 + 2] = StringLower(GUICtrlRead($Mbordercolor)) Else ; turn off the thickness (width) $aMarqueeParams[12 + 1] = "none" ; $aMarqueeParams[15] set above with $aMarqueeParams[4] EndIf EndIf $Mwidth = (GUICtrlRead($Mwidthpercent) = "Pixels" ? GUICtrlRead($Mwidthpixel) : @DesktopWidth * GUICtrlRead($Mwidthpixel) / 100) $Mheight = (GUICtrlRead($Mheightpercent) = "Pixels" ? GUICtrlRead($Mheightpixel) : @DesktopHeight * GUICtrlRead($Mheightpixel) / 100) EndIf Switch $hMsg Case $GUI_EVENT_CLOSE Exit Case $Mborderonoff If BitAND(GUICtrlRead($Mborderonoff), $GUI_CHECKED) = $GUI_CHECKED Then GUICtrlSetState($Mborderstyle, $GUI_ENABLE) GUICtrlSetState($Mborderwidth, $GUI_ENABLE) GUICtrlSetState($Mbordercolor, $GUI_ENABLE) Else GUICtrlSetState($Mborderstyle, $GUI_DISABLE) GUICtrlSetState($Mborderwidth, $GUI_DISABLE) GUICtrlSetState($Mbordercolor, $GUI_DISABLE) EndIf Case $Mdirectionup GUICtrlSetState($Mdirectiondown, $GUI_UNCHECKED) If BitAND(GUICtrlRead($Mdirectionup), $GUI_CHECKED) = $GUI_CHECKED Then ; set the Align buttons to DISABLED GUICtrlSetState($Maligntop, $GUI_DISABLE) GUICtrlSetState($Malignmiddle, $GUI_DISABLE) GUICtrlSetState($Malignbottom, $GUI_DISABLE) Else ; set the Align buttons to ENABLED GUICtrlSetState($Maligntop, $GUI_ENABLE) GUICtrlSetState($Malignmiddle, $GUI_ENABLE) GUICtrlSetState($Malignbottom, $GUI_ENABLE) EndIf Case $Mdirectiondown GUICtrlSetState($Mdirectionup, $GUI_UNCHECKED) If BitAND(GUICtrlRead($Mdirectiondown), $GUI_CHECKED) = $GUI_CHECKED Then ; set the Align buttons to DISABLED GUICtrlSetState($Maligntop, $GUI_DISABLE) GUICtrlSetState($Malignmiddle, $GUI_DISABLE) GUICtrlSetState($Malignbottom, $GUI_DISABLE) Else ; set the Align buttons to ENABLED GUICtrlSetState($Maligntop, $GUI_ENABLE) GUICtrlSetState($Malignmiddle, $GUI_ENABLE) GUICtrlSetState($Malignbottom, $GUI_ENABLE) EndIf Case $Mrepeatcont, $Mrepeattimes If BitAND(GUICtrlRead($Mrepeatcont), $GUI_CHECKED) = $GUI_CHECKED Then ; hide the 'Times' input and label GUICtrlSetState($Mrepeattimes, $GUI_DISABLE) GUICtrlSetState($Mrepeatlabel, $GUI_DISABLE) $aMarqueeParams[2] = Default Else If GUICtrlRead($Mrepeattimes) <> "" Then GUICtrlSetState($Mrepeatcont, $GUI_DISABLE) $aMarqueeParams[2] = GUICtrlRead($Mrepeattimes) Else GUICtrlSetState($Mrepeatcont, $GUI_ENABLE) $aMarqueeParams[2] = Default EndIf GUICtrlSetState($Mrepeattimes, $GUI_ENABLE) GUICtrlSetState($Mrepeatlabel, $GUI_ENABLE) EndIf Case $MSeeIt ; delete the marquee if already active If $hMGUI Then GUIDelete($hMGUI) ; create the marquee $hMGUI = GUICreate("MarqueeMaker", $Mwidth, $Mheight, 0, 0, $WS_POPUP) $aMarquee = _GUICtrlMarquee_Init() If $useW3C Then _GUICtrlMarquee_SetScroll($aMarquee, Number($aMarqueeParams[2]), $aMarqueeParams[3], $aMarqueeParams[4], Number($aMarqueeParams[5]), Number($aMarqueeParams[6]), $aMarqueeParams[12 + 3]) _GUICtrlMarquee_SetDisplay($aMarquee, $aMarqueeParams[7], $aMarqueeParams[8], $aMarqueeParams[9], Number($aMarqueeParams[10]), $aMarqueeParams[11], StringLower($aMarqueeParams[12 + 1]), $aMarqueeParams[12 + 2]) Else _GUICtrlMarquee_SetScroll($aMarquee, Number($aMarqueeParams[2]), $aMarqueeParams[3], $aMarqueeParams[4], Number($aMarqueeParams[5]), Number($aMarqueeParams[6])) _GUICtrlMarquee_SetDisplay($aMarquee, $aMarqueeParams[7], $aMarqueeParams[8], $aMarqueeParams[9], Number($aMarqueeParams[10]), $aMarqueeParams[11]) EndIf _GUICtrlMarquee_Create($aMarquee, $aMarqueeParams[12], 0, 0, $Mwidth, $Mheight) GUISetState() Case $MCreateCode ; Create Code button pushed Local $sText = "; ***************************************** code automatically generated by Marquee Maker ***************************************" & @CRLF & _ "; USE ONLY ONE OF THE SEGMENTS BELOW" & @CRLF & _ "; ********************************* created by TechCoder - TechCoder at CashFlowProducts dot com ********************************" & @CRLF & _ ";" & @CRLF & _ ";" & @CRLF & _ "; copy and paste this code section in its entirety to your program to create a GUI and marquee" & @CRLF & _ "; ***************************************** code automatically generated by Marquee Maker ***************************************" & @CRLF & _ ";" & @CRLF & _ "; IN ORDER TO ACCESS ALL THE FEATURES OF THIS PROGRAM, YOU MUST USE Marquee_W3C.au3 UDF!" & @CRLF & _ ";" & @CRLF & _ "; ********************************* created by TechCoder - TechCoder at CashFlowProducts dot com ********************************" & @CRLF & _ "$hMGUI = GUICreate('', $Mwidth, $Mheight, $iLeft, $iTop, $WS_POPUP)" & @CRLF & _ "$aMarquee = _GUICtrlMarquee_Init()" & @CRLF & _ "_GUICtrlMarquee_SetScroll($aMarquee, Number(" & $aMarqueeParams[2] & "), " & $aMarqueeParams[3] & ", " & $aMarqueeParams[4] & ", Number(" & $aMarqueeParams[5] & "), Number(" & $aMarqueeParams[6] & "), " & $aMarqueeParams[12 + 3] & ")" & @CRLF & _ "_GUICtrlMarquee_SetDisplay($aMarquee, " & $aMarqueeParams[7] & ", " & $aMarqueeParams[8] & ", " & $aMarqueeParams[9] & ", " & " Number(" & $aMarqueeParams[10] & "), " & $aMarqueeParams[11] & ", " & " StringLower(" & $aMarqueeParams[12 + 1] & "), " & $aMarqueeParams[12 + 2] & ")" & @CRLF & _ "_GUICtrlMarquee_Create($aMarquee, " & $aMarqueeParams[12] & ", $iLeft, $iTop, " & $Mwidth & ", " & $Mheight & ")" & @CRLF & _ ";" & @CRLF & _ ";" & @CRLF & _ "; copy and paste this code segment in its entirety to your program AFTER the call to _GUICtrlMarquee_Init()" & @CRLF & _ "; ***************************************** code automatically generated by Marquee Maker ***************************************" & @CRLF & _ ";" & @CRLF & _ "; IN ORDER TO ACCESS ALL THE FEATURES OF THIS PROGRAM, YOU MUST USE Marquee_W3C.au3 UDF!" & @CRLF & _ ";" & @CRLF & _ "; ********************************* created by TechCoder - TechCoder at CashFlowProducts dot com ********************************" & @CRLF & _ "_GUICtrlMarquee_SetScroll($aMarquee, Number(" & $aMarqueeParams[2] & "), " & $aMarqueeParams[3] & ", " & $aMarqueeParams[4] & ", Number(" & $aMarqueeParams[5] & "), Number(" & $aMarqueeParams[6] & "), " & $aMarqueeParams[12 + 3] & ")" & @CRLF & _ "_GUICtrlMarquee_SetDisplay($aMarquee, " & $aMarqueeParams[7] & ", " & $aMarqueeParams[8] & ", " & $aMarqueeParams[9] & ", " & " Number(" & $aMarqueeParams[10] & "), " & $aMarqueeParams[11] & ", " & " StringLower(" & $aMarqueeParams[12 + 1] & "), " & $aMarqueeParams[12 + 2] & ")" & @CRLF & _ "_GUICtrlMarquee_Create($aMarquee, " & $aMarqueeParams[12] & ", $iLeft, $iTop, " & $Mwidth & ", " & $Mheight & ")" Run("notepad.exe") WinWaitActive("Untitled - Notepad") Send($sText) #cs Case $MResetDefault _set_defaults() #ce EndSwitch WEnd Func _set_defaults() GUICtrlSetData($Mtext, "Your TEXT Goes Here") GUICtrlSetData($Mfont, "Times New Roman") GUICtrlSetData($Mfontsize, $useW3C ? "30" : "12") GUICtrlSetData($Mfontcolor, "Black") GUICtrlSetData($Mbackgroundcolor, "White") GUICtrlSetData($Mspeedamount, "6") GUICtrlSetData($Mspeeddelay, "85") GUICtrlSetData($Mwidthpixel, "100") GUICtrlSetData($Mwidthpercent, "% of Desktop") GUICtrlSetData($Mheightpixel, "200") GUICtrlSetData($Mborderwidth, "Thin") If Not $useW3C Then ; Melba23's UDF only supports three options GUICtrlSetData($Mborderwidth, "|1|2|3", "1") GUICtrlSetLimit($Mborderwidth, 1) EndIf GUICtrlSetData($Mbordercolor, "Black") GUICtrlSetState($Mscroll, $GUI_CHECKED) GUICtrlSetState($Mdirectionleft, $GUI_CHECKED) GUICtrlSetState($Mrepeatcont, $GUI_CHECKED) GUICtrlSetState($Malignmiddle, $GUI_CHECKED) GUICtrlSetState($Mrepeattimes, $GUI_DISABLE) GUICtrlSetState($Mrepeatlabel, $GUI_DISABLE) GUICtrlSetState($Mborderonoff, $GUI_CHECKED) If Not $useW3C Then GUICtrlSetState($stylelabel, $GUI_DISABLE) GUICtrlSetState($Mborderstyle, $GUI_DISABLE) EndIf EndFunc ;==>_set_defaults Func color_picker($color) Switch $color Case "Aqua" Return $COLOR_AQUA Case "Black" Return $COLOR_BLACK Case "Blue" Return $COLOR_BLUE Case "Fuchsia" Return $COLOR_FUCHSIA Case "Gray" Return $COLOR_GRAY Case "Green" Return $COLOR_GREEN Case "Lime" Return $COLOR_LIME Case "Maroon" Return $COLOR_MAROON Case "Navy" Return $COLOR_NAVY Case "Olive" Return $COLOR_OLIVE Case "Purple" Return $COLOR_PURPLE Case "Red" Return $COLOR_RED Case "Silver" Return $COLOR_SILVER Case "Teal" Return $COLOR_TEAL Case "White" Return $COLOR_WHITE Case "Yellow" Return $COLOR_YELLOW EndSwitch EndFunc ;==>color_picker