cu0x Posted August 26, 2015 Share Posted August 26, 2015 Hi guys,I´m trying to change the color of a Variable, but just a part of it, the Variable will be later text for a label.Something like this : Hello World! Doest anyone know how to do it? Appreciate your help! Link to comment Share on other sites More sharing options...
water Posted August 26, 2015 Share Posted August 26, 2015 Welcome to AutoIt and the forum!You can't set the colour in a variable, but there are UDFs available on the forum. This thread is a good starting point. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted August 26, 2015 Share Posted August 26, 2015 Do you mean label as in GUICtrlCreateLabel()? You would use GUICtrlSetColor(), but that will color it all, not just one word. Exactly what is it you want to do?Welcome to the forum! .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
cu0x Posted August 26, 2015 Author Share Posted August 26, 2015 Do you mean label as in GUICtrlCreateLabel()? You would use GUICtrlSetColor(), but that will color it all, not just one word. Exactly what is it you want to do?Welcome to the forum!exacly what I´m trying to do is to set color to just a part of the "data" of the GUICtrlCreateLabel(). My Label data is set as follow: If @error = 0 Then Local $sData = $IPLabelText & $aArray[1] & @CRLF & _ $SubnetzmaskeLabelText & $aArray[2] & @CRLF & _ $GWLabelText & $aArray[3] & @CRLF & _ $DNSLabelText & $aArray[4] & @CRLF & _ $DNSSuffixLabelText & $aArray[5] EndIfIt´s like a package of Arrays and wonna give them color in case of failure :SI know that it´s complicated but dont wonna create a Label for each Array Thanks! Link to comment Share on other sites More sharing options...
cu0x Posted August 26, 2015 Author Share Posted August 26, 2015 Welcome to AutoIt and the forum!You can't set the colour in a variable, but there are UDFs available on the forum. This thread is a good starting point.Thats what im looking for, some kind of UDF Thanks for your help! Link to comment Share on other sites More sharing options...
water Posted August 26, 2015 Share Posted August 26, 2015 My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki 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