forked from shangerxin/BookNotes
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathAutoIt Help;Note=eshang.txt
185 lines (172 loc) · 4.4 KB
/
AutoIt Help;Note=eshang.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
AutoIt Help;Note=eshang
:Function
MsgBox(0,title, message), 0 means now
;
run(applicationPath)
;
winWaitActive(windowTitle)
winWaitActive(windowTitle, windowContentText)
winWaitActive(title, text, timeout)
use the char & to instead the underline
;
winClose(windowTitle)
;
send(textString), to the active window
send("!char"), ! + char means alt + char
send("{keyboard}"), exp send("{ENTER}")
;
StringRegExp(testString, pattern[, flag])
flag, tell to return first match or all
:Command line parameters
$CmdLine[0], number of the total parameters
$CmdLine[1], first parameter after the script name
>AutoIt command line
autoIt3.exe scriptName
:AutoIt window information tool
>include
window titles, case sensitive
text ont he window(visible and hidden)
window size and position
contents of the status bar
position of the mouse
colour of the pixels underneath the pouse pointer
details of the control underneath the mouse pointer
:Advanced Window Descriptions
A special description can be used as the window title parameter. This description can be used to identify a window by the following properties:
TITLE - Window title
CLASS - The internal window classname
REGEXPTITLE - Window title using a regular expression (if the regular expression is wrong @error will be set to 2)
REGEXPCLASS - Window classname using a regular expression (if the regular expression is wrong @error will be set to 2)
LAST - Last window used in a previous AutoIt command
ACTIVE - Currently active window
X \ Y \ W \ H - The position and size of a window
INSTANCE - The 1-based instance when all given properties match \
>example
WinWaitActive("[CLASS:Notepad]", "")
>Use handle
$handle = WinGetHandle("Untitled - Notepad", "")
WinClose($handle)
:Controls, treat the controls on the window
Have these properties
ID - The internal control ID. The Control ID is the internal numeric identifier that windows gives to each control. It is generally the best method of identifying controls. In addition to the AutoIt Window Info Tool, other applications such as screenreaders for the blind and Microsoft tools/APIs may allow you to get this Control ID
TEXT - The text on a control, for example "&Next" on a button
CLASS - The internal control classname such as "Edit" or "Button"
CLASSNN - The ClassnameNN value as used in previous versions of AutoIt, such as "Edit1"
NAME - The internal .NET Framework WinForms name (if available)
REGEXPCLASS - Control classname using a regular expression
X \ Y \ W \ H - The position and size of a control.
INSTANCE - The 1-based instance when all given properties match.
>Use the control functions
ControlSend("Untitled - Notepad", "", "[CLASS:Edit; INSTANCE:1]", "This is some text")
ControlClick("My Window", "", "[ID:254]")
ControlGetHandle(titile, text, controlID)
:Input Output functions
FileReadLine, FileWriteLine
:New COM object
:For 64-bit edition
AutoIt (AutoIt3_x64.exe)
Aut2Exe (Aut2Exe_x64.exe)
Au3Info (Au3Info_x64.exe)
AutoItX (AutoItX3_x64.dll)
>Running the 32-bit on a x64 system
@SystemDir @WindowsDir & "\SYSWOW64" @WindowsDir & "\System32"
@ProgramFilesDir {SystemDrive} & "\Program Files (x86)" {SystemDrive} & "\Program Files"
:Variable
$varName
dim $varName
Enum $const1 = 1, $const2, $const3; 1,2,3
>Array
$Array[0] = value
...
:Macros
use @ instead of $
can use macros in expression but you cannot assign a value to them
>list avaliable macro in autoIt
@AppDataCommonDir path to Application Data
@AppDataDir path to current user's Application Data
...
get all the macro from the help
:Function Reference
Environment
File, directory, disk
graphic
gui
keyboard
math
message box and dialogs
misc.Management
mouse management
network
boj/com
process
registry
string
timer
tray
variables
windows
:Appendix
autoIt3 limits/defaults
ascii characters
CLSIDs of Special Folders
GUI Control Styles
@OSLang Values
Send Key List
Standard Windows Fonts
Windows Message Codes
:User Defined Function Notes
write by autoIt3 and use directly by copy/paste
>includes
array management
clipboard
color
date
debug
encryption
eventlog
excel
file
ftpex
gdiPlus
guiAvi
guiButton
guiComboBox
guiComboBoxEx
guiDateTimePicker
guiEdit
guiHeader
guiImageList
guiPAddress
guiListBox
guiListView
guiMenu
guiMonthCall
guiReBar
guiRichEdit
guiScrollbars
guiSlider
guiStatusBar
guiTab
guiToolbar
guiToolTip
guiTreeView
Ie
Inet
Math
Memory
Misc
NamedPipes
netShare
process
screencapture
security
sendmessage
sound
sqlite
string
strucutre
timers
visa
winapi
winnet
word