帮我修改一下脚本-谢谢
请高手帮我改下这处,就是将“打开文件”这处改成一运行脚本就加载“E:\我的音乐\1.mp3”,开始播放音乐。#include <Sound.au3>
#include <GUIConstantsEx.au3>
#Region ### START Koda GUI section ###
$Form1_1 = GUICreate("例", 350, 258, -1, -1)
GUISetBkColor(0xccccc)
$Sfoglia = GUICtrlCreateButton("打开文件", 130, 30, 81, 21)
$Pausa = GUICtrlCreateButton("暂 停", 48, 104, 121, 33)
GUICtrlSetFont(-1, 14, 400, 0, "黑体")
$Play = GUICtrlCreateButton("播 放", 192, 104, 113, 33)
GUICtrlSetFont(-1, 14, 400, 0, "黑体")
$Slider = GUICtrlCreateSlider(40, 200, 265, 33)
$Volume = GUICtrlCreateLabel("音量", 152, 176, 50, 20)
GUICtrlSetColor(-1, 0xFF0000)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
$Percorso = 0
GUICtrlSetData ($Slider, 80)
While 1
$nMsg = GUIGetMsg()
$Slider_volume = GUICtrlRead ($Slider)
SoundSetWaveVolume ($Slider_volume)
Select
Case $nMsg = $GUI_EVENT_CLOSE
Exit
Case $nMsg = $Sfoglia
$Percorso = (FileOpenDialog("选择:", @ScriptDir, "(*.mp3;*.wav;*.wma)") )
_SoundClose ("alias_suono")
_SoundOpen ($Percorso, "alias_suono")
Case $nMsg = $Play
_SoundPlay ("alias_suono")
Case $nMsg = $Pausa
_SoundPause ("alias_suono")
EndSelect
WEnd
[ 本帖最后由 botanycc 于 2008-5-18 19:21 编辑 ] 直接在前面塞个
_SoundPlay ("E:\我的音乐\1.mp3")
进去不行么?
好像是不行暂停失效了
[ 本帖最后由 传说 于 2008-5-17 20:07 编辑 ] 是的啊,继续期待 #include <Sound.au3>
#include <GUIConstantsEx.au3>
#Region ### START Koda GUI section ###
$Form1_1 = GUICreate("例", 350, 258, -1, -1)
GUISetBkColor(0xccccc)
$Sfoglia = GUICtrlCreateButton("打开文件", 130, 30, 81, 21)
$Pausa = GUICtrlCreateButton("暂 停", 48, 104, 121, 33)
GUICtrlSetFont(-1, 14, 400, 0, "黑体")
$Play = GUICtrlCreateButton("播 放", 192, 104, 113, 33)
GUICtrlSetFont(-1, 14, 400, 0, "黑体")
$Slider = GUICtrlCreateSlider(40, 200, 265, 33)
$Volume = GUICtrlCreateLabel("音量", 152, 176, 50, 20)
GUICtrlSetColor(-1, 0xFF0000)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
$Percorso = 0
GUICtrlSetData($Slider, 80)
$sound = _SoundOpen("E:\我的音乐\1.mp3", "alias_suono")
_SoundPlay($sound)
While 1
$nMsg = GUIGetMsg()
$Slider_volume = GUICtrlRead($Slider)
SoundSetWaveVolume($Slider_volume)
Select
Case $nMsg = $GUI_EVENT_CLOSE
Exit
Case $nMsg = $Sfoglia
$Percorso = (FileOpenDialog("选择:", @ScriptDir, "(*.mp3;*.wav;*.wma)"))
_SoundClose("alias_suono")
_SoundOpen($Percorso, "alias_suono")
Case $nMsg = $Play
$sound = _SoundOpen("E:\我的音乐\1.mp3", "alias_suono")
_SoundPlay($sound)
Case $nMsg = $Pausa
_SoundPause("alias_suono")
EndSelect
WEnd 多谢各位帮忙,问题已经解决了,5楼的最接近我的要求,稍作修改ok了。谢谢... 好東西,不知道有沒有更漂亮點的皮膚
页:
[1]