Hello all,
I have a question. I made some sort of media player. It is very simple, but in all media players the play button changes into the pause button and pauses the muzic or media. I know how to change the text, but i dont know what script to write to pause the music. I tried a lot of if, do, while, select, assigments but nothing. The code form my media player is:
CODE#include <Sound.au3>
#include <GUIConstants.au3>
GUICreate("Media Player",800,600,"","",$WS_MAXIMIZEBOX+$WS_MINIMIZEBOX)
GUISetBkColor(0x00ffff)
GUISetState()
$stop = GUICtrlCreateButton("Stop",10,10,40,20)
$play = GUICtrlCreateButton("Play",10,40,40,20)
$open = GUICtrlCreateButton("Open",10,70,40,20)
While 1
$message = GUIGetMsg()
If $message = $GUI_EVENT_CLOSE Then ExitLoop
Select
Case $message = $open
$music = FileOpenDialog("Open file",@DesktopDir,"Mp3 Files (*.mp3)")
_SoundPlay($music)
$pause = GUICtrlSetData($play,"Pause")
Case $message = $stop
_SoundStop($music)
GUICtrlSetData($play,"Play")
EndSelect
WEnd
Can you help me, please . What statement to write that the play button to play and pause the music file??