AutoIt写的小播放器

  今天才想起以前玩过的AutoIt v3,没事看着帮助文档写的一个超简单的播放器~原来AutoIt v3也支持图型界面的,原以为像C语言一样面向过程的~

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <SliderConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("简单的音乐播放器", 420, 134, 252, 258)
GUISetBkColor(0x000000)
$Input1 = GUICtrlCreateInput("输入音乐文件地址", 32, 8, 273, 21)
$Button1 = GUICtrlCreateButton("播放", 24, 64, 145, 33)
$Button2 = GUICtrlCreateButton("退出", 184, 64, 129, 33)
$Slider1 = GUICtrlCreateSlider(328, 8, 89, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
Global $daxiao = 80 , $dizhi
While 1
 $nMsg = GUIGetMsg()
 Switch $nMsg
  Case $GUI_EVENT_CLOSE
   Exit
  Case $Button2
   Exit
  Case $Input1
   $dizhi = GUICtrlRead($Input1)
  Case $Button1
   SoundPlay($dizhi)
  Case $Slider1
   $daxiao = GUICtrlRead($Slider1)
   
 EndSwitch
SoundSetWaveVolume($daxiao)
WEnd 

其实还可以搞个停止按钮,还可以继续完善的!可惜要睡觉了~

下载地址:http://d.xdeng.cn/viewfile.php?file_id=49&file_key=imWyKZSn