Sign in to follow this  
Followers 0
ashley

random background color

13 posts in this topic

#1 ·  Posted (edited)

ok as the title says...

its a random background color changer...

just put this at the under your #inculdes

#include <GUIConstants.au3>

$Rcolor = Random( 0xFFFFFF, 0x2B1B1B1, 0)

#Region ### START Koda GUI section ### Form=
$GUI = GUICreate("random background color", 604, 111, 193, 115)
GUISetBkColor($Rcolor)
$test = GUICtrlCreateLabel("this is a test to show you how to make a random background color...", 40, 32, 546, 24)
GUICtrlSetFont(-1, 12, 800, 6, "MS Sans Serif")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

now save the script...

run it look at the background color...

close it

run it look at the background color

oh look it changed...

As i said i only did this because i got bored... but someone somewere might find it useful.

tell me what you think

Edited by ashley

Share this post


Link to post
Share on other sites



I think you mean bored. This is pointless, but shows the Random() function.

i know its point less... it just makes the gui more alive...

it takes gui's one setp forward...

and somebody might find it useful...

Share this post


Link to post
Share on other sites

Hi, nice idea, I might use it if not encrypted. Why the encription? Aren't we here to share? Not trying to stir anything up. I just don't like running anything on my pc that I cannot read first..

Share this post


Link to post
Share on other sites

Hi, nice idea, I might use it if not encrypted. Why the encription? Aren't we here to share? Not trying to stir anything up. I just don't like running anything on my pc that I cannot read first..

hi thanks i didnt realise...

ill edit that now...

Share this post


Link to post
Share on other sites

SWEEEET!! That is cool!! Nice Job Ashley...

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

have you looked...

Sorry my wife and I went out Garage Selling.. Will look now..

Edit:

Looks and works very nice. Easy to add in and keeps a GUI always different..

Edited by gesller

Share this post


Link to post
Share on other sites

Sorry my wife and I went out Garage Selling.. Will look now..

Edit:

Looks and works very nice. Easy to add in and keeps a GUI always different..

thanks for the feedback

Share this post


Link to post
Share on other sites

its a nice tutorial to show the random function :whistle:


-jaenster

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