Sign in to follow this  
Followers 0

I wanna make red/green/Orange square

4 posts in this topic

Hello all :)

I made that migration script but i just wanna improve it with a single view to see if evrything is ok with Colored squares


How can i make a red square anywhere in my guy with conditional things

something like :

ControlRead ($Control1)

If $control1 = UAC activé then

    Make redsquare here

ElseIf $control1 = UAC desactivé then

    Make Greensquare here

Any help in the syntax ?

in my mind i should first of all make a white square somewhere and change the color of that square depend of my conditions ... but how can i make a square that i can change with Guictrlsetcolor ?

Share this post

Link to post
Share on other sites

What about the idea to set the GUI background color according to the condition instead of creating any graphic object?

Otherwise, just create a lable somewhere in your GUI and change the bg color of it as desired.

$iLabel_Status = GUICtrlCreateLabel("", 0, 0, 32, 32)
GUICtrlSetBkColor(-1, 0xFF0000)

Later you can change the color using GUICtrlSetBkColor($iLabel_Status, 0xFFFF00) or so.



Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post

Link to post
Share on other sites

This is just fine... i would like to not change the general GUI color but i thought about it me too x)

I dont expected i was able to change each label it s exactly what i need thx man.

Share this post

Link to post
Share on other sites

Also you can change the color of text, if you like more: GUICtrlSetColor ( controlID, textcolor )

Use AControlViewer.exe/AControlViewer_x64.exe inside Autoit folder to find color values.

My english shucks, i know it.

Share this post

Link to post
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
Sign in to follow this  
Followers 0