本帖最后由 131738 于 2015-10-28 15:11 编辑
这个我不知道你是如何切换的,怎么还要复制文件?那不会很麻烦吗…
afan 发表于 2015-10-28 14:02 #AutoIt3Wrapper_Res_Language=2052
#AutoIt3Wrapper_UseX64=n
#AutoIt3Wrapper_Res_LegalCopyright=Copyright ? 2013-2015
#AutoIt3Wrapper_Run_Obfuscator=y
#AutoIt3Wrapper_UseUpx=y
#AutoIt3Wrapper_Res_Fileversion=1.0
#AutoIt3Wrapper_OutFile=切换 AutoIt3 版本.exe
#AutoIt3Wrapper_Icon=Icon_1.ico
#include <GUIConstantsEx.au3>
#include <Array.au3>
#include <File.au3>
#include <EditConstants.au3>
$FileVersion_1 = FileGetVersion(@ScriptDir & "\AutoIt3\AutoIt3.exe"); 返回如 -- 3.3.12.0
$FileVersion_2 = FileGetVersion(@ScriptDir & "\AutoIt3\SciTE\SciTE.exe"); 返回如 -- 3.4.4.0
;列表文件夹名称到数组-- [0]=文件夹数量, [1]---[n]=文件夹名称
$aDir_Array = _FileListToArrayRec(@ScriptDir, "AutoIt3_*", 2, 0, 1, 0)
;~ _ArrayDisplay($aDir_Array)
Global $go[$aDir_Array[0] + 1]
$go[0] = $aDir_Array[0]
Local $hGUI = GUICreate("切换 AutoIt3 版本", 360, 200, -1, -1)
WinSetOnTop($hGUI, "切换 AutoIt3 版本", 1)
GUICtrlCreateLabel("当前版本" & @CRLF & "AutoIt3: v" & $FileVersion_1 & " SciTE: v" & $FileVersion_2, 5, 10, 350, 35, $ES_CENTER)
GUICtrlSetFont(-1, 12, 800)
For $i = 1 To $aDir_Array[0]
$go[$i] = GUICtrlCreateRadio($aDir_Array[$i], 100, 30 + ($i * 30), 120, 20)
Next
;~ _ArrayDisplay($go)
$Button = GUICtrlCreateButton ( "切换", 290, 150, 60, 30)
GUISetState(@SW_SHOW, $hGUI)
While 1
Local $Control_Text
$msg = GUIGetMsg()
If $msg = $GUI_EVENT_CLOSE Then ExitLoop
If $msg > 1 Then
For $x = 1 To $go[0]
If GUICtrlRead ($go[$x]) = $GUI_CHECKED Then
$Control_Text = ControlGetText ($hGUI, "切换 AutoIt3 版本", $go[$x])
Else
ContinueLoop
EndIf
Next
EndIf
If $msg = $Button And $Control_Text <> "" Then
DirMove (@ScriptDir & "\AutoIt3", @ScriptDir & "\AutoIt3_v" & $FileVersion_1, 1)
DirMove (@ScriptDir & "" & $Control_Text, @ScriptDir & "\AutoIt3", 1)
ExitLoop
EndIf
WEnd
其实就是想请教: 如何检测指定的文件夹(或该文件夹内的文件)是否被打开? |