 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
damajha
Joined: 23 Oct 2006 Posts: 31
|
Posted: Mon Jan 14, 2008 9:49 pm Post subject: Text Control Colors |
|
|
I asked something along these lines before, but I don't think I explained my self properly.
I have a text control that loops through 3 different colors and prints them. I was wondering if it is possible to change the text color to match the text? (When Blue is Output to the Gui to have it print in Blue etc)
| Code: |
Gui, Font, S14 CDefault, Verdana
Gui, Add, Text, x16 y10 w100 h30 vCols, Red
Gui, Show, Colors
Colors = Red Blue Green
StringSplit, List, Colors, %A_Space%
Loop, %List0%
{
GuiControl,, Cols, % List%A_Index%
Sleep, 2000
}
ExitApp
|
|
|
| Back to top |
|
 |
damajha
Joined: 23 Oct 2006 Posts: 31
|
Posted: Mon Jan 14, 2008 10:20 pm Post subject: |
|
|
I came up with this. It works so I thought I would post it.
| Code: |
Colors = Red Blue Green
StringSplit, List, Colors, %A_Space%
Loop, %List0%
{
TxtCol = % List%A_Index%
SetGui()
GuiControl,, Cols, % List%A_Index%
Sleep, 2000
Gui, Destroy
}
ExitApp
SetGui()
{
Global
Gui, Font, S14 CDefault, Verdana
Gui, Add, Text, x16 y10 w100 h30 c%TxtCol% vCols
Gui, Show, Colors
}
|
Kinda Clumsy, But... |
|
| Back to top |
|
 |
Sakurako
Joined: 10 May 2007 Posts: 142
|
Posted: Mon Jan 14, 2008 11:38 pm Post subject: |
|
|
| Code: | Gui, Font, S14 CRed, Verdana
Gui, Add, Text, x16 y10 w100 h30 vCols, Red
Gui, Show, Colors
Colors = Red Blue Green
StringSplit, List, Colors, %A_Space%
Loop, %List0%
{
Color := List%A_Index%
Gui, Font, c%Color%
GuiControl, Font, Cols
GuiControl,, Cols, % List%A_Index%
Sleep, 2000
}
ExitApp |
|
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|