#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <File.au3>
Opt("GUIOnEventMode", 1)
#Region ### START Koda GUI section ### Form=
GUICreate("提取文件演示", 304, 82, 192, 124)
$Extract = GUICtrlCreateInput("", 32, 20, 150, 21)
$Browse = GUICtrlCreateButton("浏 览", 200, 20, 75, 21)
GUICtrlSetOnEvent(-1,"Browse")
$Go = GUICtrlCreateButton("进行下一步操作", 32, 50, 150, 21)
GUICtrlSetOnEvent(-1,"Go")
$Quit = GUICtrlCreateButton("退 出", 200, 50, 75, 21)
GUICtrlSetOnEvent(-1, "Quit")
GUISetOnEvent($GUI_EVENT_CLOSE, "Quit")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
Sleep(100)
WEnd
Global $sRootPath
Func Browse()
$sRootPath = FileSelectFolder("选择要提取文件的所在目录", "", 1)
If @error Then
MsgBox(8192, "提示", "此次操作未选择,请重新选择")
Else
GUICtrlSetData($Extract, $sRootPath)
EndIf
EndFunc
Func Go()
If GUICtrlRead($Extract) <> "" Then
Copy($sRootPath)
Else
Other("没有选择相关文件")
EndIf
EndFunc
Func Other($a)
MsgBox(0,0,$a)
EndFunc
Func Copy($sPath) ;就是这一段运行不出
MsgBox(0,0,$sPath)
EndFunc ;==>copy
Func Quit()
Exit
EndFunc
帮忙看看 Copy($sPath) 那段运行不出。。。 |