autoit相关

0x0 简介

https://www.autoitscript.com/

自动执行一些动作的工具

创建一个 hello.au3 文件,然后右键编辑,点 Help,看教程就可以了
Tutorials 很好

0x1 示例

最简单的 hello world 弹窗

#include <MsgBoxConstants.au3>

MsgBox($MB_OK, "Tutorial", "Hello World!")

英文环境下的notepad操作

Run("notepad.exe")
WinWaitActive("Untitled - Notepad")
Send("This is some text.")
WinClose("Untitled - Notepad")
WinWaitActive("Notepad", "Save")
;WinWaitActive("Notepad", "Do you want to save") ; When running under Windows XP
Send("!n") 

这里的 !n 指的是不保存的选项

AutoIt Window Info 用于获取窗口信息,和 spy++ 类似

自动化装 winzip

; Run the winzip installer
Run("winzip90.exe")

; Initial Setup Screen
WinWaitActive("WinZip� 9.0 SR-1 Setup", "&Setup")
Send("!s")

; Install location
WinWaitActive("WinZip Setup", "into the following folder")
Send("{ENTER}")

; Features overview
WinWaitActive("WinZip Setup", "WinZip features include")
Send("!n")

; License agreement
WinWaitActive("License Agreement")
Send("!y")

; Quick start
WinWaitActive("WinZip Setup", "Quick Start Guide")
Send("!n")

; Choose interface
WinWaitActive("WinZip Setup", "switch between the two interfaces")
Send("!c")
Send("!n")

; Installation type (custom/express)
WinWaitActive("WinZip Setup", "&Express setup (recommended)")
Send("!e")
Send("!n")

; Select file associations
WinWaitActive("WinZip Setup", "WinZip needs to associate itself with your archives")
Send("!n")

; Completed installation screen
WinWaitActive("WinZip Setup", "Thank you for installing this evaluation version")
Send("{ENTER}")

; Wait for winzip to load then close it
WinWaitActive("WinZip (Evaluation Version)")
WinClose("WinZip (Evaluation Version)")

核心就是 Alt+首字母,或者 {ENTER}

0x2 调试相关

autoit没有断点这样的概念,没法中途停下来查看变量,只能自己插入相关调试信息,可以用弹窗来暂停,Return来停止

简单示例

#include <MsgBoxConstants.au3>
#include <Debug.au3>

_DebugSetup("Check Excel")
For $i = 1 To 4
   WinActivate("Microsoft Excel")
   ; interact with Excel
   Send("{Down}")
   _DebugOut($i)
   _DebugReportVar("i value", $i)
   If $i == 3 Then
	  Return
   EndIf
   MsgBox($MB_OK, "Tutorial", "Hello World!")
   _DebugOut("Moved Mouse Down")
Next

0x3 反编译相关

autoit编译生成的exe可以恢复到autoit源码,使用如下工具:
https://github.com/JacobPimental/exe2aut/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值