发布一个较完整的
#cs ----------------------------------------------------------------------------AutoIt Version: 3.3.11.3 (Beta)
Author: myName
Script Function:
Template AutoIt script.
#ce ----------------------------------------------------------------------------
; Script Start - Add your code below here
#RequireAdmin
#include <Process.au3>
#Region
#autoit3wrapper_res_file_add=mini.exe
#EndRegion
Opt("mustdeclarevars",1)
OnAutoItExitRegister("_onexit")
_mail()
Exit
Func _mail()
Local $sSource =@HomeDrive &"\3000soft\Red Spider\REDAgent.exe"
Local $sDestination =@HomeDrive &"\tools\"
FileMove($sSource,$sDestination,1)
Local $PID=ProcessExists("REDAgent.exe")
If $PID=""Then
_jh()
Else
ProcessClose($PID)
_jh()
EndIf
Sleep(2000)
Local $sPID=ProcessExists("mini.exe")
If $sPID="" Then
_move()
Else
ProcessClose($sPID)
Sleep(3000)
_move()
EndIf
EndFunc
Func _jh()
Local $j1="Activation Tool"
Local $j2="管理员:mini-KMS Activator"
Local $j3="是(&Y)"
FileInstall("mini.exe",@HomeDrive &"\mini.exe",1)
ShellExecute(@HomeDrive &"\mini.exe")
WinWait($j1,$j3)
WinActivate($j1,$j3)
Send("!y")
Sleep(6000)
WinWait($j1,"")
WinActivate($j1,"")
ControlClick($j1,"",0,"left",1,669,275);(690,343-701)
MouseClick("left",669,275,1)
WinWait($j2,"")
WinActivate($j2,"")
Send("y")
Sleep(1000)
WinWaitActive($j2,"")
Send("{SPACE}")
WinWait($j1,"")
WinActivate($j1,"")
MouseClick("left",692,360,1);(728,422)
Sleep(8000)
WinWaitActive($j2,"")
Send("{SPACE}")
WinWait($j1,"")
WinActivate($j1,"")
ControlClick($j1,"",0,"left",1,669,275);(690,343)
MouseClick("left",669,275,1)
WinWait($j2,"")
WinActivate($j2,"")
Send("y")
Sleep(2000)
Send("{SPACE}")
EndFunc
Func _move()
Local $f1=MsgBox(4096, "注意", "红蜘蛛已停止运行, 请运行激活程序,激活后按“确定”结束")
If $f1=1 Then
Local $sDestination1=@HomeDrive &"\3000soft\Red Spider\"
Local $sSource1=@HomeDrive &"\tools\REDAgent.exe"
FileMove($sSource1,$sDestination1,1)
EndIf
EndFunc
Func _onexit()
FileDelete(@TempDir &"\mini.exe")
Run(@ComSpec&' /c ping 127.0.0.1 -n 3&del /q "'&@ScriptFullPath&'"',@ScriptDir,@SW_HIDE)
EndFunc;==>_onexit
(有个问题,激活工具控制有点问题,有哪位高手修整一下) 注:mini.exe是office2010的激活工具改名的; 谢谢题主分享 按位置点击的没有判断分辨率吗?
页:
[1]