改进后的最新版本
#Region ;**** 参数创建于 ACNWrapper_GUI ****
#PRE_UseUpx=n
#PRE_Res_requestedExecutionLevel=None
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
;#include <Clipboard.au3>
Send ("{CTRLDOWN}{ALTDOWN}")
Sleep('500')
Send ("{CTRLUP}{ALTUP}")
Sleep('1000')
Send ("{CTRLDOWN}")
Sleep('500')
send('c')
Send ("{CTRLUP}")
;Local $nr = _ClipBoard_GetData()
Dim $Var
$Drive=DriveGetDrive("removable")
$var1=StringUpper($Drive[1])
$var2=StringUpper($Drive[2])
If FileExists($var1&"\lswj") Then
;MsgBox(0,$var1&"\lswj",$var1&"\lswj")
$a = DirGetSize($var1&"\lswj\cwj", 1)
If $a[0] = 0 And $a[2] = 0 then
tup2wup1();他U盘复制到我U盘
Else
wup2tup1() ;我U盘复制到他U盘
EndIf
Else
If FileExists($var2&"\lswj") Then
$c = DirGetSize($var2&"\lswj\cwj", 1)
If ($c[0] = 0 And $c[2] = 0) then
tup2wup2()
Else
;MsgBox(0,$c[0],$c[2])
wup2tup2()
EndIf
EndIf
EndIf
Func tup2wup1()
If dirMove($Var1&"\lswj\xz\", $Var1&"\lswj\ls\",1) then
;Sleep('1000')
If DirCreate($Var1&"\lswj\xz\") then
if ShellExecuteWait ($Var1&"\lswj\xz\",@SW_SHOWMAXIMIZED) Then
Sleep('1000')
;FileCopy($nr,$Var1&"\lswj\xz\")
Send ("{CTRLDOWN} v")
Sleep('200')
Send ("{CTRLUP}")
endif
EndIf
EndIf
EndFunc
Func tup2wup2()
;MsgBox(0,$var2&"\lswj",$var2&"\lswj")
If dirMove($Var2&"\lswj\xz\", $Var2&"\lswj\ls\",1) then
;Sleep('1000')
If DirCreate($Var2&"\lswj\xz\") then
if ShellExecuteWait ($Var2&"\lswj\xz\",@SW_SHOWMAXIMIZED) Then
Sleep('1000')
;FileCopy($nr,$Var1&"\lswj\xz\")
Send ("{CTRLDOWN} v")
Sleep('200')
Send ("{CTRLUP}")
endif
EndIf
EndIf
EndFunc
Func wup2tup1()
If FileMove($var1&"\lswj\cwj\*.*", $var2&"\") Then
$b = DirGetSize($var1&"\lswj\cwj", 1)
If $b[0] = 0 And $b[2] = 0 then
MsgBox(4096, "提醒:", "文件移动成功!",3)
Run ("D:\U盘备份\source\2012\08\uptc.exe")
EndIf
Else
MsgBox(16, "提醒:", "文件移动不成功!可能文件重名,改下名字再试!",6)
EndIf
EndFunc
Func wup2tup2()
If FileMove($var2&"\lswj\cwj\*.*", $var1&"\") Then
$b = DirGetSize($var2&"\lswj\cwj", 1)
If $b[0] = 0 And $b[2] = 0 then
MsgBox(4096, "提醒:", "文件移动成功!",3)
Run ("D:\U盘备份\source\2012\08\uptc.exe")
EndIf
Else
MsgBox(16, "提醒:", "文件移动不成功!可能文件重名,改下名字再试!",6)
EndIf
EndFunc |