Sign in to follow this  
Followers 0
keen

Need help seting an image

7 posts in this topic

I want to change an image when a button is pushed. Any help? Here is my current scripy:

#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]

Share this post


Link to post
Share on other sites



I need this soon Please!

Thanks!

-keen


[center]Kesne's Bar & Grill[/center]

Share this post


Link to post
Share on other sites

um delete it and then set it i guess is what u what guictrldelete ?

Share this post


Link to post
Share on other sites

What? You post didnt make much sence...

thanks!

-keen


[center]Kesne's Bar & Grill[/center]

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

yes im sorry i didnt understand guictrlsetimage is the way to go

Share this post


Link to post
Share on other sites

Finaly got it working! Thanks guys!

-keen


[center]Kesne's Bar & Grill[/center]

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