Jump to content

Need color help and other


AlmarM
 Share

Recommended Posts

Hey,

I got a question...

I've made this example script:

#include <GUIConstants.au3>

$GUI = GUICreate("Example", 480, 300, -1, -1)
GUISetState(@SW_SHOW)
$Input_1 = GUICtrlCreateInput("", 10, 270, 460, 20)
GUICtrlCreateLabel("Example Lable", 10, 245)
$Button_1 = GUICtrlCreateButton("1", 10, 220, 20, 20)
$Button_2 = GUICtrlCreateButton("2", 30, 220, 20, 20)
$Button_3 = GUICtrlCreateButton("3", 50, 220, 20, 20)
$Button_4 = GUICtrlCreateButton("4", 70, 220, 20, 20)
$Button_5 = GUICtrlCreateButton("5", 90, 220, 20, 20)
$Button_6 = GUICtrlCreateButton("6", 110, 220, 20, 20)
$Button_7 = GUICtrlCreateButton("7", 130, 220, 20, 20)
$Button_8 = GUICtrlCreateButton("8", 150, 220, 20, 20)
$Button_9 = GUICtrlCreateButton("9", 170, 220, 20, 20)
$Button_10 = GUICtrlCreateButton("10", 190, 220, 20, 20)
$Button_11 = GUICtrlCreateButton("11", 210, 220, 20, 20)
$Button_12 = GUICtrlCreateButton("12", 230, 220, 20, 20)
$Button_13 = GUICtrlCreateButton("13", 250, 220, 20, 20)
$Button_14 = GUICtrlCreateButton("14", 270, 220, 20, 20)
$Button_15 = GUICtrlCreateButton("15", 290, 220, 20, 20)
$Button_16 = GUICtrlCreateButton("16", 310, 220, 20, 20)
$Button_17 = GUICtrlCreateButton("17", 330, 220, 20, 20)
$Button_18 = GUICtrlCreateButton("18", 350, 220, 20, 20)
$Button_19 = GUICtrlCreateButton("19", 370, 220, 20, 20)
$Button_20 = GUICtrlCreateButton("20", 390, 220, 20, 20)
$Button_21 = GUICtrlCreateButton("21", 410, 220, 20, 20)
$Button_22 = GUICtrlCreateButton("22", 430, 220, 20, 20)
$Button_23 = GUICtrlCreateButton("23", 450, 220, 20, 20)
$Group_1 = GUICtrlCreateGroup("Example Group", 10, 180, 460, 30)


GUISetState()
While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
Exit
EndSelect
WEnd

And my question is..

Is there a way to made the buttons have a color??

If there is... Can someone explain me ??

Buttons Color:

1 = 0xff0000

2 = 0x00ff00

3 = 0xffff00

4 = 0x0707f4

5 = 0x00ffff

6 = 0xff00ff

7 = 0xffffff

8 = 0xf47d07

9 = 0x7b7b7b

10 = 0x0e0e0e

11 = 0x7815dd

12 = 0xffff7f

13 = 0x1b78d1

14 = 0x3399cc

15 = 0xc4f4c4

16 = 0x006633

17 = 0x953432

18 = 0x993300

19 = 0xbd9239

20 = 0xb8b9b8

21 = 0x0e7b7b

22 = 0xe9e9b2

23 = 0x999933

Question 2

Is there a way that if you press a button it will send for example.. If you press 1 (Red Button) it will send ^1 into the Inputbox ??

Question 3

Is there a way that if you typ something into the input box, it will be shown in the GUICtrlCreateGroup() (With colors, so if there is the value ^1 in the input the script will show all things AFTHER the ^1 is red)

Hope you get me ^^

Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Link to comment
Share on other sites

This demo uses random colors, but you could read them from an array if you had specific ones in mind:

#include <GUIConstants.au3>

Opt("GuiOnEventMode", 1)

$ButtonCount = 10 ; Edit this to change button count
$Gui_W = 15 + ($ButtonCount * 25)
Global $avButtonColors[$ButtonCount + 1] = [$ButtonCount]

$hGUI = GUICreate("Example", $Gui_W, 190)
GUISetOnEvent($GUI_EVENT_CLOSE, "_Quit")
For $n = 1 To $ButtonCount
    $Button_1 = GUICtrlCreateButton($n, 10 + (($n - 1) * 25), 20, 20, 20)
    GUICtrlSetOnEvent(-1, "_ButtonHit")
    $avButtonColors[$n] = (Random(0, 255, 1) * 256 * 256) + (Random(0, 255, 1) * 256) + Random(0, 255, 1)
    GUICtrlSetBkColor(-1, $avButtonColors[$n])
Next
$Input_1 = GUICtrlCreateInput("Example Input", 10, 60, $Gui_W - 20, 20)
GUICtrlCreateLabel("Example Label", 10, 100, $Gui_W - 20, 20, $SS_CENTER)
$Group_1 = GUICtrlCreateGroup("Example Group", 10, 140, $Gui_W - 20, 30)

GUISetState()
While 1
    Sleep(20)
WEnd

Func _ButtonHit()
    $sText = GUICtrlRead(@GUI_CtrlId)
    $iButton = Number($sText)
    ControlSetText($hGUI, "", $Input_1, "Button: " & $sText & "  Color: 0x" & Hex($avButtonColors[$iButton], 6))
EndFunc   ;==>_ButtonHit

Func _Quit()
    Exit
EndFunc   ;==>_Quit

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Ehm..

I wanne use this colors:

Buttons Color:

1 = 0xff0000

2 = 0x00ff00

3 = 0xffff00

4 = 0x0707f4

5 = 0x00ffff

6 = 0xff00ff

7 = 0xffffff

8 = 0xf47d07

9 = 0x7b7b7b

10 = 0x0e0e0e

11 = 0x7815dd

12 = 0xffff7f

13 = 0x1b78d1

14 = 0x3399cc

15 = 0xc4f4c4

16 = 0x006633

17 = 0x953432

18 = 0x993300

19 = 0xbd9239

20 = 0xb8b9b8

21 = 0x0e7b7b

22 = 0xe9e9b2

23 = 0x999933

Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Link to comment
Share on other sites

Ehm..

I wanne use this colors:

Buttons Color:

...

Well, you needn't be that helpless, I did mention how to do that:

#include <GUIConstants.au3>

Opt("GuiOnEventMode", 1)

Global $avButtonColors[24] = [23, 0xff0000, 0x00ff00, 0xffff00, 0x0707f4, 0x00ffff, 0xff00ff, _
        0xffffff, 0xf47d07, 0x7b7b7b, 0x0e0e0e, 0x7815dd, 0xffff7f, 0x1b78d1, 0x3399cc, 0xc4f4c4, _
        0x006633, 0x953432, 0x993300, 0xbd9239, 0xb8b9b8, 0x0e7b7b, 0xe9e9b2, 0x999933]
$Gui_W = 15 + ($avButtonColors[0] * 25)

$hGUI = GUICreate("Example", $Gui_W, 190)
GUISetOnEvent($GUI_EVENT_CLOSE, "_Quit")
For $n = 1 To $avButtonColors[0]
    $Button_1 = GUICtrlCreateButton($n, 10 + (($n - 1) * 25), 20, 20, 20)
    GUICtrlSetOnEvent(-1, "_ButtonHit")
    GUICtrlSetBkColor(-1, $avButtonColors[$n])
Next
$Input_1 = GUICtrlCreateInput("Example Input", 10, 60, $Gui_W - 20, 20)
GUICtrlCreateLabel("Example Label", 10, 100, $Gui_W - 20, 20, $SS_CENTER)
$Group_1 = GUICtrlCreateGroup("Example Group", 10, 140, $Gui_W - 20, 30)

GUISetState()
While 1
    Sleep(20)
WEnd

Func _ButtonHit()
    $sText = GUICtrlRead(@GUI_CtrlId)
    $iButton = Number($sText)
    ControlSetText($hGUI, "", $Input_1, "Button: " & $sText & "  Color: 0x" & Hex($avButtonColors[$iButton], 6))
EndFunc   ;==>_ButtonHit

Func _Quit()
    Exit
EndFunc   ;==>_Quit

I suppose now you want a cookie before dinner too?

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

#include <GUIConstants.au3>

$GUI = GUICreate("Example", 480, 300, -1, -1)
GUISetState(@SW_SHOW)
$Input_1 = GUICtrlCreateInput("", 10, 270, 460, 20)
GUICtrlCreateLabel("Example Lable", 10, 245)
$Button_1 = GUICtrlCreateButton("1", 10, 220, 20, 20)
GUICtrlSetBkColor(-1, 0xff0000)
$Button_2 = GUICtrlCreateButton("2", 30, 220, 20, 20)
GUICtrlSetBkColor(-1, 0x00ff00)
$Button_3 = GUICtrlCreateButton("3", 50, 220, 20, 20)
GUICtrlSetBkColor(-1, 0xffff00)
$Button_4 = GUICtrlCreateButton("4", 70, 220, 20, 20)
GUICtrlSetBkColor(-1, 0x0707f4)
$Button_5 = GUICtrlCreateButton("5", 90, 220, 20, 20)
GUICtrlSetBkColor(-1, 0x00ffff)
$Button_6 = GUICtrlCreateButton("6", 110, 220, 20, 20)
GUICtrlSetBkColor(-1, 0xff00ff)
$Button_7 = GUICtrlCreateButton("7", 130, 220, 20, 20)
GUICtrlSetBkColor(-1, 0xffffff)
$Button_8 = GUICtrlCreateButton("8", 150, 220, 20, 20)
GUICtrlSetBkColor(-1, 0xf47d07)
$Button_9 = GUICtrlCreateButton("9", 170, 220, 20, 20)
GUICtrlSetBkColor(-1, 0x7b7b7b)
$Button_10 = GUICtrlCreateButton("10", 190, 220, 20, 20)
GUICtrlSetBkColor(-1, 0x0e0e0e)
$Button_11 = GUICtrlCreateButton("11", 210, 220, 20, 20)
GUICtrlSetBkColor(-1, 0x7815dd)
$Button_12 = GUICtrlCreateButton("12", 230, 220, 20, 20)
GUICtrlSetBkColor(-1, 0xffff7f)
$Button_13 = GUICtrlCreateButton("13", 250, 220, 20, 20)
GUICtrlSetBkColor(-1, 0x1b78d1)
$Button_14 = GUICtrlCreateButton("14", 270, 220, 20, 20)
GUICtrlSetBkColor(-1, 0x3399cc)
$Button_15 = GUICtrlCreateButton("15", 290, 220, 20, 20)
GUICtrlSetBkColor(-1, 0xc4f4c4)
$Button_16 = GUICtrlCreateButton("16", 310, 220, 20, 20)
GUICtrlSetBkColor(-1, 0x006633)
$Button_17 = GUICtrlCreateButton("17", 330, 220, 20, 20)
GUICtrlSetBkColor(-1, 0x953432)
$Button_18 = GUICtrlCreateButton("18", 350, 220, 20, 20)
GUICtrlSetBkColor(-1, 0x993300)
$Button_19 = GUICtrlCreateButton("19", 370, 220, 20, 20)
GUICtrlSetBkColor(-1, 0xbd9239)
$Button_20 = GUICtrlCreateButton("20", 390, 220, 20, 20)
GUICtrlSetBkColor(-1, 0xb8b9b8)
$Button_21 = GUICtrlCreateButton("21", 410, 220, 20, 20)
GUICtrlSetBkColor(-1, 0x0e7b7b)
$Button_22 = GUICtrlCreateButton("22", 430, 220, 20, 20)
GUICtrlSetBkColor(-1, 0xe9e9b2)
$Button_23 = GUICtrlCreateButton("23", 450, 220, 20, 20)
GUICtrlSetBkColor(-1, 0x999933)
$Group_1 = GUICtrlCreateGroup("Example Group", 10, 180, 460, 30)


GUISetState()
While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
Exit
Case $msg = $Button_1
GUICtrlSetData($Input_1, "^1", "|")
Case $msg = $Button_2
GUICtrlSetData($Input_1, "^2", "|")
Case $msg = $Button_3
GUICtrlSetData($Input_1, "^3", "|")
Case $msg = $Button_4
GUICtrlSetData($Input_1, "^4", "|")
Case $msg = $Button_5
GUICtrlSetData($Input_1, "^5", "|")
Case $msg = $Button_6
GUICtrlSetData($Input_1, "^6", "|")
Case $msg = $Button_7
GUICtrlSetData($Input_1, "^7", "|")
Case $msg = $Button_8
GUICtrlSetData($Input_1, "^8", "|")
Case $msg = $Button_9
GUICtrlSetData($Input_1, "^9", "|")
Case $msg = $Button_10
GUICtrlSetData($Input_1, "^0", "|")
Case $msg = $Button_11
GUICtrlSetData($Input_1, "^e", "|")
Case $msg = $Button_12
GUICtrlSetData($Input_1, "^o", "|")
Case $msg = $Button_13
GUICtrlSetData($Input_1, "^d", "|")
Case $msg = $Button_14
GUICtrlSetData($Input_1, "^f", "|")
Case $msg = $Button_15
GUICtrlSetData($Input_1, "^g", "|")
Case $msg = $Button_16
GUICtrlSetData($Input_1, "^h", "|")
Case $msg = $Button_17
GUICtrlSetData($Input_1, "^j", "|")
Case $msg = $Button_18
GUICtrlSetData($Input_1, "^k", "|")
Case $msg = $Button_19
GUICtrlSetData($Input_1, "^l", "|")
Case $msg = $Button_20
GUICtrlSetData($Input_1, "^z", "|")
Case $msg = $Button_21
GUICtrlSetData($Input_1, "^b", "|")
Case $msg = $Button_22
GUICtrlSetData($Input_1, "^n", "|")
Case $msg = $Button_23
GUICtrlSetData($Input_1, "^m", "|")
EndSelect
WEnd

Solved the problem with the collored buttons and the send function

Now im gonne test something

Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Link to comment
Share on other sites

I just cant test something... How can i make the script it will read the input... for example..

I typed (and pressed buttons) ^2Ex^7am^4ple

And i want that the script will show the user what he typed... ^2 = Green ^8 = Orange ^4 = Dark Blue

Etc

So the script will show

Example

And... I want the script to show that in the Group()

Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Link to comment
Share on other sites

I now got this

#include <GUIConstants.au3>

$GUI = GUICreate("Example", 480, 300, -1, -1)
GUISetState(@SW_SHOW)
$Input_1 = GUICtrlCreateInput("", 10, 270, 460, 20)
GUICtrlCreateLabel("Example Lable", 10, 245)
$Button_1 = GUICtrlCreateButton("1", 10, 220, 20, 20)
GUICtrlSetBkColor(-1, 0xff0000)
$Button_2 = GUICtrlCreateButton("2", 30, 220, 20, 20)
GUICtrlSetBkColor(-1, 0x00ff00)
$Button_3 = GUICtrlCreateButton("3", 50, 220, 20, 20)
GUICtrlSetBkColor(-1, 0xffff00)
$Button_4 = GUICtrlCreateButton("4", 70, 220, 20, 20)
GUICtrlSetBkColor(-1, 0x0707f4)
$Button_5 = GUICtrlCreateButton("5", 90, 220, 20, 20)
GUICtrlSetBkColor(-1, 0x00ffff)
$Button_6 = GUICtrlCreateButton("6", 110, 220, 20, 20)
GUICtrlSetBkColor(-1, 0xff00ff)
$Button_7 = GUICtrlCreateButton("7", 130, 220, 20, 20)
GUICtrlSetBkColor(-1, 0xffffff)
$Button_8 = GUICtrlCreateButton("8", 150, 220, 20, 20)
GUICtrlSetBkColor(-1, 0xf47d07)
$Button_9 = GUICtrlCreateButton("9", 170, 220, 20, 20)
GUICtrlSetBkColor(-1, 0x7b7b7b)
$Button_10 = GUICtrlCreateButton("10", 190, 220, 20, 20)
GUICtrlSetBkColor(-1, 0x0e0e0e)
$Button_11 = GUICtrlCreateButton("11", 210, 220, 20, 20)
GUICtrlSetBkColor(-1, 0x7815dd)
$Button_12 = GUICtrlCreateButton("12", 230, 220, 20, 20)
GUICtrlSetBkColor(-1, 0xffff7f)
$Button_13 = GUICtrlCreateButton("13", 250, 220, 20, 20)
GUICtrlSetBkColor(-1, 0x1b78d1)
$Button_14 = GUICtrlCreateButton("14", 270, 220, 20, 20)
GUICtrlSetBkColor(-1, 0x3399cc)
$Button_15 = GUICtrlCreateButton("15", 290, 220, 20, 20)
GUICtrlSetBkColor(-1, 0xc4f4c4)
$Button_16 = GUICtrlCreateButton("16", 310, 220, 20, 20)
GUICtrlSetBkColor(-1, 0x006633)
$Button_17 = GUICtrlCreateButton("17", 330, 220, 20, 20)
GUICtrlSetBkColor(-1, 0x953432)
$Button_18 = GUICtrlCreateButton("18", 350, 220, 20, 20)
GUICtrlSetBkColor(-1, 0x993300)
$Button_19 = GUICtrlCreateButton("19", 370, 220, 20, 20)
GUICtrlSetBkColor(-1, 0xbd9239)
$Button_20 = GUICtrlCreateButton("20", 390, 220, 20, 20)
GUICtrlSetBkColor(-1, 0xb8b9b8)
$Button_21 = GUICtrlCreateButton("21", 410, 220, 20, 20)
GUICtrlSetBkColor(-1, 0x0e7b7b)
$Button_22 = GUICtrlCreateButton("22", 430, 220, 20, 20)
GUICtrlSetBkColor(-1, 0xe9e9b2)
$Button_23 = GUICtrlCreateButton("23", 450, 220, 20, 20)
GUICtrlSetBkColor(-1, 0x999933)
$Group_1 = GUICtrlCreateGroup("Example Group", 10, 140, 460, 35)
$Show_Button = GUICtrlCreateButton("Show Name", 10, 180, 460, 40)

GUISetState()
While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
Exit
Case $msg = $Button_1
GUICtrlSetData($Input_1, "^1", "|")
Case $msg = $Button_2
GUICtrlSetData($Input_1, "^2", "|")
Case $msg = $Button_3
GUICtrlSetData($Input_1, "^3", "|")
Case $msg = $Button_4
GUICtrlSetData($Input_1, "^4", "|")
Case $msg = $Button_5
GUICtrlSetData($Input_1, "^5", "|")
Case $msg = $Button_6
GUICtrlSetData($Input_1, "^6", "|")
Case $msg = $Button_7
GUICtrlSetData($Input_1, "^7", "|")
Case $msg = $Button_8
GUICtrlSetData($Input_1, "^8", "|")
Case $msg = $Button_9
GUICtrlSetData($Input_1, "^9", "|")
Case $msg = $Button_10
GUICtrlSetData($Input_1, "^0", "|")
Case $msg = $Button_11
GUICtrlSetData($Input_1, "^e", "|")
Case $msg = $Button_12
GUICtrlSetData($Input_1, "^o", "|")
Case $msg = $Button_13
GUICtrlSetData($Input_1, "^d", "|")
Case $msg = $Button_14
GUICtrlSetData($Input_1, "^f", "|")
Case $msg = $Button_15
GUICtrlSetData($Input_1, "^g", "|")
Case $msg = $Button_16
GUICtrlSetData($Input_1, "^h", "|")
Case $msg = $Button_17
GUICtrlSetData($Input_1, "^j", "|")
Case $msg = $Button_18
GUICtrlSetData($Input_1, "^k", "|")
Case $msg = $Button_19
GUICtrlSetData($Input_1, "^l", "|")
Case $msg = $Button_20
GUICtrlSetData($Input_1, "^z", "|")
Case $msg = $Button_21
GUICtrlSetData($Input_1, "^b", "|")
Case $msg = $Button_22
GUICtrlSetData($Input_1, "^n", "|")
Case $msg = $Button_23
GUICtrlSetData($Input_1, "^m", "|")
Case $msg = $Show_Button
$Read = GUICtrlRead($Input_1)
$Show_Label = GUICtrlCreateLabel($Read, 20, 155, "", 15)
EndSelect
WEnd

But what I want is that if you typed (pressed button) ^1 the script will show in the label the color Red and same with other colors... So if there is typed

^1Ex^2am^3pl^4e

The label should be Example

Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Link to comment
Share on other sites

I found this:

#include <GUIConstants.au3>

$GUI = GUICreate("Example", 480, 300, -1, -1)
GUISetState(@SW_SHOW)
$Input_1 = GUICtrlCreateInput("", 10, 270, 460, 20)
GUICtrlCreateLabel("Example Lable", 10, 245)
$Button_1 = GUICtrlCreateButton("1", 10, 220, 20, 20)
GUICtrlSetBkColor(-1, 0xff0000)
$Button_2 = GUICtrlCreateButton("2", 30, 220, 20, 20)
GUICtrlSetBkColor(-1, 0x00ff00)
$Button_3 = GUICtrlCreateButton("3", 50, 220, 20, 20)
GUICtrlSetBkColor(-1, 0xffff00)
$Button_4 = GUICtrlCreateButton("4", 70, 220, 20, 20)
GUICtrlSetBkColor(-1, 0x0707f4)
$Button_5 = GUICtrlCreateButton("5", 90, 220, 20, 20)
GUICtrlSetBkColor(-1, 0x00ffff)
$Button_6 = GUICtrlCreateButton("6", 110, 220, 20, 20)
GUICtrlSetBkColor(-1, 0xff00ff)
$Button_7 = GUICtrlCreateButton("7", 130, 220, 20, 20)
GUICtrlSetBkColor(-1, 0xffffff)
$Button_8 = GUICtrlCreateButton("8", 150, 220, 20, 20)
GUICtrlSetBkColor(-1, 0xf47d07)
$Button_9 = GUICtrlCreateButton("9", 170, 220, 20, 20)
GUICtrlSetBkColor(-1, 0x7b7b7b)
$Button_10 = GUICtrlCreateButton("10", 190, 220, 20, 20)
GUICtrlSetBkColor(-1, 0x0e0e0e)
$Button_11 = GUICtrlCreateButton("11", 210, 220, 20, 20)
GUICtrlSetBkColor(-1, 0x7815dd)
$Button_12 = GUICtrlCreateButton("12", 230, 220, 20, 20)
GUICtrlSetBkColor(-1, 0xffff7f)
$Button_13 = GUICtrlCreateButton("13", 250, 220, 20, 20)
GUICtrlSetBkColor(-1, 0x1b78d1)
$Button_14 = GUICtrlCreateButton("14", 270, 220, 20, 20)
GUICtrlSetBkColor(-1, 0x3399cc)
$Button_15 = GUICtrlCreateButton("15", 290, 220, 20, 20)
GUICtrlSetBkColor(-1, 0xc4f4c4)
$Button_16 = GUICtrlCreateButton("16", 310, 220, 20, 20)
GUICtrlSetBkColor(-1, 0x006633)
$Button_17 = GUICtrlCreateButton("17", 330, 220, 20, 20)
GUICtrlSetBkColor(-1, 0x953432)
$Button_18 = GUICtrlCreateButton("18", 350, 220, 20, 20)
GUICtrlSetBkColor(-1, 0x993300)
$Button_19 = GUICtrlCreateButton("19", 370, 220, 20, 20)
GUICtrlSetBkColor(-1, 0xbd9239)
$Button_20 = GUICtrlCreateButton("20", 390, 220, 20, 20)
GUICtrlSetBkColor(-1, 0xb8b9b8)
$Button_21 = GUICtrlCreateButton("21", 410, 220, 20, 20)
GUICtrlSetBkColor(-1, 0x0e7b7b)
$Button_22 = GUICtrlCreateButton("22", 430, 220, 20, 20)
GUICtrlSetBkColor(-1, 0xe9e9b2)
$Button_23 = GUICtrlCreateButton("23", 450, 220, 20, 20)
GUICtrlSetBkColor(-1, 0x999933)
$Group_1 = GUICtrlCreateGroup("Example Group", 10, 140, 460, 35)
$Show_Button = GUICtrlCreateButton("Show Name", 10, 180, 460, 40)

GUISetState()
While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
Exit
Case $msg = $Button_1
GUICtrlSetData("",(GUICtrlSetColor($Input_1, 0xff0000)))
Case $msg = $Button_2
GUICtrlSetData("",(GUICtrlSetColor($Input_1, 0x00ff00)))
Case $msg = $Button_3
GUICtrlSetData($Input_1, "^3", "|")
Case $msg = $Button_4
GUICtrlSetData($Input_1, "^4", "|")
Case $msg = $Button_5
GUICtrlSetData($Input_1, "^5", "|")
Case $msg = $Button_6
GUICtrlSetData($Input_1, "^6", "|")
Case $msg = $Button_7
GUICtrlSetData($Input_1, "^7", "|")
Case $msg = $Button_8
GUICtrlSetData($Input_1, "^8", "|")
Case $msg = $Button_9
GUICtrlSetData($Input_1, "^9", "|")
Case $msg = $Button_10
GUICtrlSetData($Input_1, "^0", "|")
Case $msg = $Button_11
GUICtrlSetData($Input_1, "^e", "|")
Case $msg = $Button_12
GUICtrlSetData($Input_1, "^o", "|")
Case $msg = $Button_13
GUICtrlSetData($Input_1, "^d", "|")
Case $msg = $Button_14
GUICtrlSetData($Input_1, "^f", "|")
Case $msg = $Button_15
GUICtrlSetData($Input_1, "^g", "|")
Case $msg = $Button_16
GUICtrlSetData($Input_1, "^h", "|")
Case $msg = $Button_17
GUICtrlSetData($Input_1, "^j", "|")
Case $msg = $Button_18
GUICtrlSetData($Input_1, "^k", "|")
Case $msg = $Button_19
GUICtrlSetData($Input_1, "^l", "|")
Case $msg = $Button_20
GUICtrlSetData($Input_1, "^z", "|")
Case $msg = $Button_21
GUICtrlSetData($Input_1, "^b", "|")
Case $msg = $Button_22
GUICtrlSetData($Input_1, "^n", "|")
Case $msg = $Button_23
GUICtrlSetData($Input_1, "^m", "|")
Case $msg = $Show_Button
$Read = GUICtrlRead($Input_1)
$Show_Label = GUICtrlCreateLabel($Read, 20, 155, "", 15)
EndSelect
WEnd

But if I press a colored button it will make the whole InputBox that color (only what you typed or is gonne be typed)

And I want that it will only color a text... Where I was thinking about is a InputBox() that will ask what text need to be that color.

Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...