keen Posted December 23, 2006 Posted December 23, 2006 I want to change an image when a button is pushed. Any help? Here is my current scripy: expandcollapse popup#include <GUIConstants.au3> #include <Xskin.au3> #Include <File.au3> #include <Media.au3> $skin_folder = @ScriptDir & "\images\skin" XskinGUICreate("Amp Music", 1085,800, $skin_folder) GUISetBkColor (0xffffff) $Pic1 = GUICtrlCreatePic("S:\My Documents\JORDANS STUFF\Amp Music\images\BG.gif", 73, 50, 937, 697, BitOR($SS_NOTIFY,$WS_GROUP)) $Pic2 = GUICtrlCreatePic("S:\My Documents\JORDANS STUFF\Amp Music\images\Knobs.gif", 249, 80, 81, 81, BitOR($SS_NOTIFY,$WS_GROUP)) $Pic3 = GUICtrlCreatePic("S:\My Documents\JORDANS STUFF\Amp Music\images\Volume.gif", 249, 167, 81, 25, BitOR($SS_NOTIFY,$WS_GROUP)) $Pic4 = GUICtrlCreatePic("S:\My Documents\JORDANS STUFF\Amp Music\images\input.gif", 91, 92, 59, 59, BitOR($SS_NOTIFY,$WS_GROUP)) $Pic4 = GUICtrlCreatePic("S:\My Documents\JORDANS STUFF\Amp Music\images\songs.gif", 450, 290, 70, 38, BitOR($SS_NOTIFY,$WS_GROUP)) $fileread = FileRead ("E:\") If $fileread = "" Then $Pic5 = GUICtrlCreatePic("S:\My Documents\JORDANS STUFF\Amp Music\images\No-CD.gif", 81, 154, 80, 68, BitOR($SS_NOTIFY,$WS_GROUP)) Else $Pic6 = GUICtrlCreatePic("S:\My Documents\JORDANS STUFF\Amp Music\images\CD.gif", 81, 154, 80, 68, BitOR($SS_NOTIFY,$WS_GROUP)) EndIf GUICtrlCreateList( $fileread , 550, 220,100,200) _MediaPlay($fileread) $Pic6 = GUICtrlCreatePic("S:\My Documents\JORDANS STUFF\Amp Music\images\non-play.gif", 825, 75, 102, 102, BitOR($SS_NOTIFY,$WS_GROUP)) $button = GUICtrlCreateButton ( "Play", 750, 100,60,35) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE Exit Case $msg = $button GUICtrlSetGraphic($Pic6, "S:\My Documents\JORDANS STUFF\Amp Music\images\play.gif") Case $Pic1 Case $Pic2 EndSwitch WEnd Thanks! -keen [center]Kesne's Bar & Grill[/center]
keen Posted December 23, 2006 Author Posted December 23, 2006 I need this soon Please! Thanks! -keen [center]Kesne's Bar & Grill[/center]
Thatsgreat2345 Posted December 23, 2006 Posted December 23, 2006 um delete it and then set it i guess is what u what guictrldelete ?
keen Posted December 23, 2006 Author Posted December 23, 2006 What? You post didnt make much sence... thanks! -keen [center]Kesne's Bar & Grill[/center]
kyler Posted December 23, 2006 Posted December 23, 2006 possibly change GUICtrlSetGraphic($Pic6, "S:\My Documents\JORDANS STUFF\Amp Music\images\play.gif") oÝ÷ ÚÚºÚ"µÍÕRPÝÙ][XYÙJ ÌÍÔXÍ ][ÝÔÎÌLÓ^HØÝ[Y[ÉÌLÒÔSÈÕQÌLÐ[]ÚXÉÌLÚ[XYÙÉÌLÜ^KÚY][ÝÊB idk... that seems like it might work
Thatsgreat2345 Posted December 23, 2006 Posted December 23, 2006 yes im sorry i didnt understand guictrlsetimage is the way to go
keen Posted December 23, 2006 Author Posted December 23, 2006 Finaly got it working! Thanks guys! -keen [center]Kesne's Bar & Grill[/center]
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