|
本帖最后由 765058729 于 2012-12-19 11:21 编辑
#Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_Icon=C:\Users\Admini\Desktop\ww8.ico
#AutoIt3Wrapper_OutFile=C:\Users\Admini\Desktop\winren.exe
#AutoIt3Wrapper_Res_Comment=情無独钟
#AutoIt3Wrapper_Res_Description=情無独钟
#AutoIt3Wrapper_Res_FileVersion=2.0.0.0
#AutoIt3Wrapper_Res_LegalCopyright=2.0.0.0
#AutoIt3Wrapper_Res_SaveSource=y
#AutoIt3Wrapper_Run_Tidy=y
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <ACN_HASH.au3>
Global $Hash, $FileHandle, $Filename, $Buffersize = 0x20000
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("畸形目录管理", 313, 35, -1, 1, -1, $WS_EX_ACCEPTFILES)
$Button1 = GUICtrlCreateButton("确定", 0, 0, 0, 0)
Dim $Form1_AccelTable[1][2] = [["{ENTER}", $Button1]]
GUISetAccelerators($Form1_AccelTable)
$Input1 = GUICtrlCreateInput("", 8, 8, 297, 21)
GUICtrlSetState(-1, 8)
$Filename = GUICtrlRead($Input1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
WinSetOnTop($Form1, "", 1)
FileInstall("ren.exe", "c:\windows\ren.exe", 1)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$strInput1 = StringLower(GUICtrlRead($Input1))
If $strInput1 = "" Then
MsgBox(0 + 16 + 262144, "警告", "您没有输入任何内容!")
Else
$aa = GUICtrlRead($Input1)
Run("ww.exe " & $aa & " " & $aa & ".")
EndIf
Case $GUI_EVENT_DROPPED
$_Filename = ControlCommand($Form1, '', $Input1, 'GetSelected', '')
If StringInStr($_Filename, "|") <> 0 Then
GUICtrlSetData($Input1, "浏览或拖曳一个文件到这里")
MsgBox(16, "错误", "一次只能拖曳一个文件!", 5)
GUICtrlSetData($Input1, $Filename)
Else
GUICtrlSetData($Input1, $_Filename)
$aa = GUICtrlRead($Input1)
Run("ren.exe " & $aa & " " & $aa & ".")
GUICtrlSetData($Input1, "成功")
EndIf
EndSwitch
WEnd
经过二楼大哥提醒已经可以运行了,可是怎么自动判断是不是的带点的文件夹改回来呢,是就去掉(.) 不是就加上(.),au3有截取变量的命令吗 $aa 是获得的文件名,不胜感激 |
|