Skrip 1 Posted January 25, 2007 (edited) Is it possible to make a color chooser, kinda like WMP 11? Where it about changes the whole gui granite to that color? Edited January 25, 2007 by Firestorm Hide Skrip's signature Hide all signatures [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left] Share this post Link to post Share on other sites
Paulie 26 Posted January 25, 2007 Is it possible to make a color chooser, kinda like WMP 11? Where it about changes the whole gui granite to that color?I know you could make a normal slider with a label next to it that goes through all the colors, but turning the actual slider into a rainbow, i dunno Share this post Link to post Share on other sites
Valuater 122 Posted January 25, 2007 (edited) Just playing.... and it actually works too!!!need the Button demo here...http://www.autoitscript.com/fileman/users/valuater/PicButton.zipand this re-vised codeexpandcollapse popup#include <GUIConstants.au3> #include <_ControlHover.au3> Opt("MouseCoordMode", 0) ;1=absolute, 0=relative, 2=client Opt("PixelCoordMode", 0) ;1=absolute, 0=relative, 2=clien Dim $var, $Color_win, $pos $Form1 = GUICreate("Picture Based Button Demo", 362, 237, 336, 310, $WS_POPUP) GUISetBkColor(0x000000) $Pic1 = GUICtrlCreatePic("bitmap\left0.bmp", 4, 4, 23, 24, BitOR($SS_NOTIFY,$WS_GROUP)) $Pic2 = GUICtrlCreatePic("bitmap\right0.bmp", 28, 4, 23, 24, BitOR($SS_NOTIFY,$WS_GROUP)) $Pic3 = GUICtrlCreatePic("rainbow.jpg", 10, 100, 335, 15, BitOR($SS_NOTIFY,$WS_GROUP)) GUICtrlSetState( -1, $GUI_DISABLE) GUICtrlCreateLabel( "", 10, 100, 20, 15) GUICtrlSetBkColor( -1, 0x000000) $slider = GUICtrlCreateSlider(10, 80, 335, 20) $btn = GUICtrlCreateButton( "Test Color", 120, 150, 120, 30) WinSetTrans($Form1, "", 0) GUISetState(@SW_SHOW) If @OSVersion <> "WIN_NT4" And @OSVersion <> "WIN_ME" And @OSVersion <> "WIN_98" And @OSVersion <> "WIN_95" And @OSVersion <> "WIN_6.0" And @OSVersion <> "WIN_6.1" Then For $transcount = 0 To 255 Step 17 WinSetTrans($Form1, "", $transcount) Sleep(11) Next EndIf _ControlHover(2, "", $Pic1) _ControlHover(2, "", $Pic2) While 1 AutoItSetOption("MouseCoordMode",0) $pos = MouseGetPos() $1 = ControlGetPos($Form1,"", $Pic1) $nMsg = GUIGetMsg() If $nMsg = $slider Then $pos = MouseGetPos() $Svar = PixelGetColor( $pos[0] , $pos[1] + 20) $var = "0x" & Hex($Svar,6) EndIf If $nMsg = $btn Then GUISetBkColor($var) If $nMsg = $GUI_EVENT_CLOSE Then If @OSVersion <> "WIN_NT4" And @OSVersion <> "WIN_ME" And @OSVersion <> "WIN_98" And @OSVersion <> "WIN_95" And @OSVersion <> "WIN_6.0" And @OSVersion <> "WIN_6.1" Then For $transcount = 255 To 0 Step -17 WinSetTrans($Form1, "", $transcount) Sleep(11) Next EndIf Exit EndIf $Over = _ControlHover(0, $Form1) If $Over = 1 Then $tempID = @extended If $tempID = $Pic2 Then GUICtrlSetImage($Pic2,"bitmap\right1.bmp") Else GUICtrlSetimage($Pic2,"bitmap\right0.bmp") EndIf If $tempID = $Pic1 Then GUICtrlSetImage($Pic1,"bitmap\left1.bmp") Else GUICtrlSetimage($Pic1,"bitmap\left0.bmp") EndIf EndIf $Click = _ControlHover(1, $Form1) If $Click = 1 And @extended = $Pic1 Then GUICtrlSetImage($Pic1,"bitmap\left2.bmp") ToolTip("You Clicked Left Button", 10, 10, "ToolTip", 1) Sleep(138) If $tempID = $Pic1 Then GUICtrlSetImage($Pic1,"bitmap\left1.bmp") Else GUICtrlSetimage($Pic1,"bitmap\left0.bmp") EndIf EndIf If $Click = 1 And @extended = $Pic2 Then GUICtrlSetImage($Pic2,"bitmap\right2.bmp") ToolTip("You Clicked Right Button", 10, 10, "ToolTip", 1) Sleep(138) If $tempID = $Pic2 Then GUICtrlSetImage($Pic2,"bitmap\right1.bmp") Else GUICtrlSetimage($Pic2,"bitmap\right0.bmp") EndIf EndIf WEnd Func Get_Color() $pos = MouseGetPos() $Svar = PixelGetColor( $pos[0] , $pos[1] + 20) $var = "0x" & Hex($Svar,6) EndFunc Func Show_Color() ;MouseMove($pos[0], $pos[1] + 10) ;If WinExists($Color_win) Then GUIDelete($Color_win) ClipPut($var) $my_color = $var $Color_win = GUICreate("RGB Color = " & $var, 290, 150, -1, -1) GUISetBkColor($var) GUISetFont(9, 400, -1, "MS Sans Serif") GUICtrlCreateLabel(" This Color has been Copied to the ClipBoard " & @CRLF & @CRLF & " Just Paste it wherever you would like"& @CRLF & @CRLF & @CRLF & " Mouse position X=" & $pos[0] & " Y=" & $pos[1] , 10, 10, 270, 100) GUICtrlSetFont(-1, 9, 650) If $var = 0x000000 Then GUICtrlSetColor( -1, 0xFFFFFF) $OK_Btn = GUICtrlCreateButton("&OK", 100, 110, 80, 30) GUISetState() While 2 $msg1 = GUIGetMsg() If $msg1 = $OK_Btn Or $msg1 = $GUI_EVENT_CLOSE Then ExitLoop WEnd GUIDelete($Color_win) GUISetState( @SW_SHOW, $Form1) EndFunc8) Edited January 25, 2007 by Valuater Hide Valuater's signature Hide all signatures Share this post Link to post Share on other sites
Skrip 1 Posted January 26, 2007 (edited) Just playing.... and it actually works too!!! need the Button demo here... http://www.autoitscript.com/fileman/users/valuater/PicButton.zip and this re-vised code Code 8) Um...That didn't work. Sorry Valuater. When I run it, I don't see the rainbow. Edited January 26, 2007 by Firestorm Hide Skrip's signature Hide all signatures [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left] Share this post Link to post Share on other sites
SmOke_N 207 Posted January 26, 2007 Um...That didn't work. Sorry Valuater.When I run it, I don't see the rainbow.Why is it when someone tries something that works for someone and not them, they say... "Sorry"... ? I've never understood that... is it, "Hey, I'm too lazy to look at what you coded to try and fix it myself" or "Hey, nice effort dipshit, but it sucks... keep trying for me though"? Hide SmOke_N's signature Hide all signatures Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Share this post Link to post Share on other sites