ashley Posted July 20, 2007 Posted July 20, 2007 well i extended the 'random background color changer' (with some help) to make this:a 'random background picture changer' well here it is:#cs ---------------------------------------------------------------------------- AutoIt Version: 3.2.2.0 Author: ashley #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here #include <GUIConstants.au3> #Region ### START Koda GUI section ### Form= $GUI = GUICreate("random background picture", 604, 111, 193, 115) $test = GUICtrlCreateLabel("This is a test to show you how to make a random background picture...", 40, 32, 546, 24) $RBGpic = Random(1, 3, 1) If $RBGpic = 1 Then GUICtrlCreatePic("C:\Documents and Settings\Windows\Desktop\Picture one.bmp" , 0, 0, 604, 155, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)) ElseIf $RBGpic = 2 Then GUICtrlCreatePic("C:\Documents and Settings\Windows\Desktop\Picture two.bmp" , 0, 0, 604, 155, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)) ElseIf $RBGpic = 3 Then GUICtrlCreatePic("C:\Documents and Settings\Windows\Desktop\Picture three.bmp" , 0, 0, 604, 155, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)) EndIf GUISetState() #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd tell me what you think...and the test pics are attached... Free icons for your programs
Toady Posted July 20, 2007 Posted July 20, 2007 Simple and very easy. You should combine both topics, they are accentually the same. www.itoady.com A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding
ashley Posted July 20, 2007 Author Posted July 20, 2007 Simple and very easy.You should combine both topics, they are accentually the same.no because one is a picture changer and one is a color changer.. so it easy to have the in diffrent topics... Free icons for your programs
Toady Posted July 20, 2007 Posted July 20, 2007 You should make a random control color changer. That would be even better. Hope to see it soon! www.itoady.com A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding
ashley Posted July 20, 2007 Author Posted July 20, 2007 You should make a random control color changer. That would be even better. Hope to see it soon!i dont get it.. what do you mean Free icons for your programs
Toady Posted July 20, 2007 Posted July 20, 2007 A Control is like a button, listview, label, ect... you use Koda so I guess you never heard of them. www.itoady.com A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding
ashley Posted July 20, 2007 Author Posted July 20, 2007 A Control is like a button, listview, label, ect... you use Koda so I guess you never heard of them.yep.. amke a one button excample... and ill get it Free icons for your programs
Toady Posted July 20, 2007 Posted July 20, 2007 yep.. amke a one button excample... and ill get it $button = Guictrlcreatebutton("",30,20,80,30) www.itoady.com A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding
ashley Posted July 20, 2007 Author Posted July 20, 2007 $button = Guictrlcreatebutton("",30,20,80,30) i meen one random color bit for it... Free icons for your programs
Toady Posted July 20, 2007 Posted July 20, 2007 i meen one random color bit for it...One color bit? What you talkin bout Willis? www.itoady.com A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding
Generator Posted July 20, 2007 Posted July 20, 2007 i meen one random color bit for it...You can random from the range and hex it to 8.
ashley Posted July 20, 2007 Author Posted July 20, 2007 (edited) do you men something like this #cs ---------------------------------------------------------------------------- AutoIt Version: 3.2.2.0 Author: ashley Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- #include <GUIConstants.au3> $Randomcolor = Random( 0xFFFFFF, 0x2B1B1B1, 0) $randomfontsize = Random ( 8, 24) #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 610, 105, 193, 115) $Label1 = GUICtrlCreateLabel("this is too show you a random label color a font size", 0, 0, 610, 105) GUICtrlSetColor(-1, $Randomcolor) GUICtrlSetFont(-1, $randomfontsize , 400, 0, "Arial") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Edit = part of code missing... Edited July 20, 2007 by ashley Free icons for your programs
Generator Posted July 20, 2007 Posted July 20, 2007 Most of the time i found your script useless since it's some random func that you combined. For the GUIBackground picture changer you should use @ScriptDir and here? #include <GUIConstants.au3> Global $Form1 $Randomcolor = Random( 0xFFFFFF, 0x2B1B1B1, 1) $randomfontsize = Random ( 8, 24) #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 610, 105, 193, 115) $Label1 = GUICtrlCreateLabel("this is too show you a random label color a font size", 0, 0, 610, 105) GUICtrlSetColor(-1, $Randomcolor) GUICtrlSetFont(-1, $randomfontsize , 400, 0, "Arial") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 _Random() $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func _Random() Local $Random=Random(0xFFFFFF, 0x2B1B1B1, 1) Hex($Random,8) GUISetBkColor($Random,$Form1) EndFunc
ashley Posted July 20, 2007 Author Posted July 20, 2007 nice.. to flashy tho... Free icons for your programs
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