Jump to content

Need help seting an image


keen
 Share

Recommended Posts

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]

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...