au3 0.0.1-x86-mswin32-60

Sign up to get free protection for your applications and to get access to all the features.
data/ext/README.rdoc ADDED
@@ -0,0 +1,84 @@
1
+ =au3
2
+ <tt>.au3</tt> is the usual file extension for {AutoIt version 3}[http://www.autoitscript.com/autoit3/index.shtml]
3
+ scripts. That this library uses it as its name, tells a lot about
4
+ its features. Basically, the +au3+ library can do everything
5
+ you can do with the <tt>.au3</tt> files:
6
+ * Automate the mouse
7
+ * Automate the keyboard
8
+ * Manipulate Windows
9
+ * etc.
10
+ However, there a a few exceptions, since +au3+ doesn't use
11
+ the AutoIt v3 interpreter behind the scenes. Instead, +au3+ is wrapped
12
+ around the DLL interface of AutoIt3, known as AutoItX3.
13
+ ==DLL problems: So to use this
14
+ As said, au3 is wrapped around AutoItX3. To get au3 working, you have
15
+ to have the file "AutoItX3.dll" somewhere in your PATH. The simplest way
16
+ to get this is just to download AutoIt from http://www.autoitscript.com
17
+ and copy the AutoItX3.dll file from the AutoItX subdirectory into the
18
+ directory your script resides in. Or, if you don't want to copy the file
19
+ over and over again, put it in your Ruby's bin directory.
20
+ ==Usage
21
+ The majority of +au3+'s methods is bundled the AutoItX3 module
22
+ and accessable via it's module methods. In order to get them,
23
+ just require +au3+:
24
+ require "au3"
25
+
26
+ AutoItX3.move_mouse(100, 100)
27
+ The window-related methods are put together in the
28
+ AutoItX3::Window class. That allows you to create
29
+ Rubyish Window objects rather than using the procedural
30
+ function interface of AutoItX3. You needn't have to require them
31
+ extra.
32
+ require "au3"
33
+
34
+ window = AutoItX3::Window.new("au3") #The beginning of a window's title is enough
35
+ window.close
36
+ Version 3 of AutoIt is known for its capabilities of direct
37
+ interaction with a window's controls. You will find this methods
38
+ wrapped in the AutoItX3::Control class.
39
+ require "au3"
40
+
41
+ window = AutoItX3::Window.new("Un") #Unnamed, Unbenannt, whatever, this should be a notepad window...
42
+ window.activate
43
+ edit = window.focused_control
44
+ edit.text = "ABCDEFG"
45
+ ===A note about encodings
46
+ This is important: During working with Ruby 1.9 (like me, for example),
47
+ you may have become used to encode your files in UTF-8. You'll
48
+ run into problems when referencing window and control texts which
49
+ contain non-ASCII characters. For instance, the German equivalent
50
+ for the "Run" window is called "Ausf�hren". Now, if you try
51
+ something like the following you will get an error saying that
52
+ the window can't be found:
53
+ window = AutoItX3::Window.new("Ausf�hren")
54
+ Instead, you must encode the window titles in your local
55
+ encoding (what can be easily done by String's #encode method).
56
+ This works:
57
+ #Windows-1252 is the German standard encoding in Windows
58
+ window = AutoItX3::Window.new("Ausf�hren".encode("Windows-1252"))
59
+ Alternatively you can encode your whole sourcefile in your locale encoding.
60
+ ===AutoIt problems in Vista
61
+ I made the experience that the AutoItX3 API seems to have some problems in
62
+ Windows Vista. I tried to run this code:
63
+ require "au3"
64
+ AutoItX3.move_mouse(100, 100)
65
+ but nothing happened. As I found out, this does only happen when I
66
+ try running from my programming editor (SciTE); when I run the script
67
+ from the command line, everything worked fine. So, if your script does not
68
+ work as expected and seems to leave out parts, try running it from the console.
69
+ ==Don't know where to start?
70
+ Have a look at the documentation of the AutoItX3 module.
71
+ +au3+ is well documented and even if you don't find something
72
+ useful, you may just want to play around with it. ;-)
73
+ ==Copyright
74
+ Copyright � 2009 Marvin G�lker
75
+ Licensed under the same terms as Ruby (see http://www.ruby-lang.org/en/LICENSE.txt )
76
+ Initia in potestate nostra sunt, de eventu fortuna iudicat.
77
+ ==License
78
+ This program is free software: you can redistribute it and/or modify
79
+ it under the terms of Ruby's license.
80
+
81
+ This program is distributed in the hope that it will be useful,
82
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
83
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
84
+ Ruby's license for more details.
data/ext/au3.c ADDED
@@ -0,0 +1,2225 @@
1
+ /*
2
+ *This file is part of au3.
3
+ *Copyright � 2009 Marvin G�lker
4
+ *
5
+ *au3 is published under the same terms as Ruby.
6
+ *See http://www.ruby-lang.org/en/LICENSE.txt
7
+ *
8
+ *=au3.c
9
+ *Main file of the AutoItX-Ruby API. Defines the Init_au3 function and
10
+ *documents the methods of this library because RDoc cannot find the
11
+ *subfiles in the parts subdirectory.
12
+ */
13
+
14
+ //--
15
+ //================================================================
16
+ //BEGIN DOCUMENTATION
17
+ //================================================================
18
+ //++
19
+
20
+ /*Document-class: AutoItX3
21
+ *
22
+ *This module encapsulates all methods to interact with
23
+ *AutoItX3. Every method is documented, so you should't have
24
+ *problems with using them. However, a few notes:
25
+ *==Mouse Functions
26
+ *Many mouse functions take an argument called +button+. This can be one
27
+ *of the following strings:
28
+ * String | Normal result | Swapped buttons
29
+ * ====================+=================+================
30
+ * "" (empty string) | Left | Left
31
+ * --------------------+-----------------+----------------
32
+ * Left | Left | Left
33
+ * --------------------+-----------------+----------------
34
+ * Right | Right | Right
35
+ * --------------------+-----------------+----------------
36
+ * Middle | Middle | Middle
37
+ * --------------------+-----------------+----------------
38
+ * Primary | Left | Right
39
+ * --------------------+-----------------+----------------
40
+ * Secondary | Right | Left
41
+ * --------------------+-----------------+----------------
42
+ * Main | Left | Right
43
+ * --------------------+-----------------+----------------
44
+ * Menu | Right | Left
45
+ *==Process Functions
46
+ *The +pid+ parameter of many process functions
47
+ *needn't to be a process identification number, you can
48
+ *also pass in the name of the process. Please note, that
49
+ *in that case the first process with +pid+ in its name is
50
+ *assumed to be the correct one.
51
+ *
52
+ */
53
+
54
+ /*
55
+ *Document-class: AutoItX3::Au3Error
56
+ *
57
+ *This class is used for errors in this library.
58
+ */
59
+
60
+ /*
61
+ *Document-class: AutoItX3::Window
62
+ *
63
+ *A Window object holds a (pseudo) reference to a
64
+ *window that may be shown on the screen or not.
65
+ *If you want to get a real handle to the window,
66
+ *call #handle on your Window object (but you won't
67
+ *need that unless you want to use it for Win32 API calls).
68
+ */
69
+
70
+ /*
71
+ *Document-class: AutoItX3::Control
72
+ *
73
+ *This is the superclass for all controls. If you don't find
74
+ *a subclass of Control that matches your specific control,
75
+ *you can use the Control class itself (and if you call
76
+ *Window#focused_control, you *will* have to use it,
77
+ *since that method retuns a Control and not a subclass).
78
+ */
79
+
80
+ /*
81
+ *Document-class: AutoItX3::ListBox
82
+ *
83
+ *List boxes are controls in which you can select one
84
+ *or multiple items by clicking on it. ListBox is also
85
+ *the superclass of ComboBox.
86
+ */
87
+
88
+ /*
89
+ *Document-class: AutoItX3::ComboBox
90
+ *
91
+ *A combo box is a control on which you click
92
+ *and then select a single item from the droped
93
+ *list box.
94
+ */
95
+
96
+ /*
97
+ *Document-class: AutoItX3::Button
98
+ *
99
+ *A button is a control on which you can click and than something happens.
100
+ *Even if that's quite correct, that isn't all: check and radio boxes
101
+ *are handled by Windows as buttons, so they fall into the scope of this class.
102
+ */
103
+
104
+ /*
105
+ *Document-class: AutoItX3::Edit
106
+ *
107
+ *An edit control is a single- or multiline input control in which you can
108
+ *type text. For example, notepad consists mainly of a big edit control.
109
+ */
110
+
111
+ /*
112
+ *Document-class: AutoItX3::TabBook
113
+ *A tab book or tab bar is a control that shows up most often
114
+ *at the top of a window and lets you choice between different
115
+ *contents within the same window.
116
+ */
117
+
118
+ //--
119
+ //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
120
+ //BEGIN DOCUMENTATION misc.c
121
+ //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
122
+ //++
123
+
124
+ /*
125
+ *Document-method: AutoItX3.last_error
126
+ *
127
+ *call-seq:
128
+ * AutoItX3.last_error ==> aFixnum
129
+ *
130
+ *Returns the error code of the last called AutoItX3 function, which is 0 if
131
+ *everything worked fine. The returned value will be between -5 and 5.
132
+ */
133
+
134
+ /*
135
+ *Document-method: AutoItX3.set_option
136
+ *
137
+ *call-seq:
138
+ * AutoItX3.set_option( option [, value ] ) ==> anInteger
139
+ * AutoItX3.opt( option [, value ] ) ==> anInteger
140
+ *
141
+ *Sets an option that changes the behaviour of AutoIt.
142
+ *The following options are possible:
143
+ *
144
+ * Option | Description
145
+ * ====================+============================================================
146
+ * CaretCoordMode | Sets the way coords are used in the caret functions,
147
+ * | either absolute coords or coords relative to the current
148
+ * | active window:
149
+ * | 0 = relative coords to the active window
150
+ * | 1 = absolute screen coordinates (default)
151
+ * | 2 = relative coords to the client area of the active window
152
+ * --------------------+------------------------------------------------------------
153
+ * ColorMode | Sets the way colors are defined, either RGB or BGR. RGB is
154
+ * | the default but in previous versions of AutoIt (pre 3.0.102)
155
+ * | BGR was the default:
156
+ * | 0 = Colors are defined as RGB (0xRRGGBB) (default)
157
+ * | 1 = Colors are defined as BGR (0xBBGGRR) (the mode used in
158
+ * | older versions of AutoIt)
159
+ * --------------------+------------------------------------------------------------
160
+ * MouseClickDelay | Alters the length of the brief pause in between mouse
161
+ * | clicks.
162
+ * | Time in milliseconds to pause (default=10).
163
+ * --------------------+------------------------------------------------------------
164
+ * MouseClickDownDelay | Alters the length a click is held down before release.
165
+ * | Time in milliseconds to pause (default=10).
166
+ * --------------------+------------------------------------------------------------
167
+ * MouseClickDragDelay | Alters the length of the brief pause at the start and
168
+ * | end of a mouse drag operation.
169
+ * | Time in milliseconds to pause (default=250).
170
+ * --------------------+------------------------------------------------------------
171
+ * MouseCoordMode | Sets the way coords are used in the mouse functions,
172
+ * | either absolute coords or coords relative to the current
173
+ * | active window:
174
+ * | 0 = relative coords to the active window
175
+ * | 1 = absolute screen coordinates (default)
176
+ * | 2 = relative coords to the client area of the active window
177
+ * --------------------+------------------------------------------------------------
178
+ * PixelCoordMode | Sets the way coords are used in the pixel functions,
179
+ * | either absolute coords or coords relative to the current
180
+ * | active window:
181
+ * | 0 = relative coords to the active window
182
+ * | 1 = absolute screen coordinates (default)
183
+ * | 2 = relative coords to the client area of the active window
184
+ * --------------------+------------------------------------------------------------
185
+ * SendAttachMode | Specifies if AutoIt attaches input threads when using then
186
+ * | Send() function. When not attaching (default mode=0)
187
+ * | detecting the state of capslock/scrolllock and numlock
188
+ * | can be unreliable under NT4. However, when you specify
189
+ * | attach mode=1 the Send("{... down/up}") syntax will not
190
+ * | work and there may be problems with sending keys to "hung"
191
+ * | windows. ControlSend() ALWAYS attaches and is not affected
192
+ * | by this mode.
193
+ * | 0 = don't attach (default)
194
+ * | 1 = attach
195
+ * --------------------+------------------------------------------------------------
196
+ * SendCapslockMode | Specifies if AutoIt should store the state of capslock
197
+ * | before a Send function and restore it afterwards.
198
+ * | 0 = don't store/restore
199
+ * | 1 = store and restore (default)
200
+ * --------------------+------------------------------------------------------------
201
+ * SendKeyDelay | Alters the the length of the brief pause in between
202
+ * | sent keystrokes.
203
+ * | Time in milliseconds to pause (default=5). Sometimes a
204
+ * | value of 0 does not work; use 1 instead.
205
+ * --------------------+------------------------------------------------------------
206
+ * SendKeyDownDelay | Alters the length of time a key is held down before
207
+ * | released during a keystroke. For applications that
208
+ * | take a while to register keypresses (and many games)
209
+ * | you may need to raise this value from the default.
210
+ * | Time in milliseconds to pause (default=1).
211
+ * --------------------+------------------------------------------------------------
212
+ * WinDetectHiddenText | Specifies if hidden window text can be "seen" by the
213
+ * | window matching functions.
214
+ * | 0 = Do not detect hidden text (default)
215
+ * | 1 = Detect hidden text
216
+ * --------------------+------------------------------------------------------------
217
+ * WinSearchChildren | Allows the window search routines to search child windows
218
+ * | as well as top-level windows.
219
+ * | 0 = Only search top-level windows (default)
220
+ * | 1 = Search top-level and child windows
221
+ * --------------------+------------------------------------------------------------
222
+ * WinTextMatchMode | Alters the method that is used to match window text
223
+ * | during search operations.
224
+ * | 1 = Complete / Slow mode (default)
225
+ * | 2 = Quick mode
226
+ * | In quick mode AutoIt can usually only "see" dialog text,
227
+ * | button text and the captions of some controls. In the
228
+ * | default mode much more text can be seen (for instance the
229
+ * | contents of the Notepad window).
230
+ * | If you are having performance problems when performing
231
+ * | many window searches then changing to the "quick" mode may
232
+ * | help.
233
+ * --------------------+------------------------------------------------------------
234
+ * WinTitleMatchMode | Alters the method that is used to match window titles
235
+ * | during search operations.
236
+ * | 1 = Match the title from the start (default)
237
+ * | 2 = Match any substring in the title
238
+ * | 3 = Exact title match
239
+ * | 4 = Advanced mode, see the AutoItX3 help.
240
+ * --------------------+------------------------------------------------------------
241
+ * WinWaitDelay | Alters how long a script should briefly pause after a
242
+ * | successful window-related operation.
243
+ * | Time in milliseconds to pause (default=250).
244
+ *
245
+ *The table above was copied from the the AutoItX3 help file.
246
+ *====Returnvalue
247
+ *The previous value of the option.
248
+ */
249
+
250
+ /*
251
+ *Document-method: AutoItX3.block_input=
252
+ *
253
+ *call-seq:
254
+ * AutoItX3.block_input = block ==> true or false
255
+ *
256
+ *Blocks user input or enables it (but the user can gain back control by
257
+ *pressing [CTRL] + [ALT] + [DEL]). In older versions of Windows,
258
+ *AutoIt may also be blocked.
259
+ */
260
+
261
+ /*
262
+ *Document-method: AutoItX3.input_blocked?
263
+ *
264
+ *call-seq:
265
+ * AutoItX3.input_blocked? ==> true or false
266
+ *
267
+ *Determines wheather or not input is blocked by #block_input= .
268
+ */
269
+
270
+ /*
271
+ *Document-method: AutoItX3.open_cd_tray
272
+ *
273
+ *call-seq:
274
+ * AutoItX3.open_cd_tray( drive ) ==> true or false
275
+ *
276
+ *Opens the cd drive named in +drive+. +drive+ should be of form
277
+ *<tt>"X:"</tt>. The cd tray must be local at this computer, remote drives
278
+ *cannot be accessed.
279
+ *====Returnvalue
280
+ *true, if the drive was opened successfully, Otherwise false (the cd tray may be locked),
281
+ */
282
+
283
+ /*
284
+ *Document-method: AutoItX3.close_cd_tray
285
+ *
286
+ *call-seq:
287
+ * AutoItX3.close_cd_tray( drive ) ==> true or false
288
+ *
289
+ *Closes a cd tray. +drive+ should be of form <tt>"X:"</tt>. The cd tray must
290
+ *be local at this computer, remote drives cannot be accessed.
291
+ *The method may return true if +drive+ is a laptop drive which can only be
292
+ *closed manually.
293
+ *====Returnvalue
294
+ *true if the drive was closed successfully, false ohterwise (the drive may be locked).
295
+ */
296
+
297
+ /*
298
+ *Document-method: AutoItX3.is_admin?
299
+ *
300
+ *call-seq:
301
+ * AutoItX3.is_admin? ==> true or false
302
+ *
303
+ *Determines wheather the current user has administrator privileges.
304
+ */
305
+
306
+ //--
307
+ //This method seems to have been removed.
308
+ /*
309
+ *Document-method: AutoItX3.download_file
310
+ *
311
+ *call-seq:
312
+ * AutoItX3.download_file( url , target ) ==> true or false
313
+ *
314
+ *Downloads a website or file. This method tries to load the file from the
315
+ *IE cache first, so Internet Explorer 3 or higher must be installed.
316
+ */
317
+ //++
318
+
319
+ /*
320
+ *Document-method: AutoItX3.cliptext=
321
+ *
322
+ *call-seq:
323
+ * AutoItX3.cliptext = text ==> nil
324
+ * AutoItX3.write_clipboard( text ) ==> nil
325
+ *
326
+ *Writes +text+ to the Windows clipboard.
327
+ *You can't write NUL characters to the clipboard, the text will
328
+ *be terminated.
329
+ */
330
+
331
+ /*
332
+ *Document-method: AutoItX3.cliptext
333
+ *
334
+ *call-seq:
335
+ * AutoItX3.cliptext ==> aString
336
+ * AutoItX3.read_clipboard ==> aString
337
+ *
338
+ *Read text from the clipboard. If the clipboard is empty or contains
339
+ *a non-text entry, an empty string "" will be returned. The maximum length
340
+ *that can be returned is 9999 characters.
341
+ */
342
+
343
+ /*
344
+ *Document-method: AutoItX3.tool_tip
345
+ *
346
+ *call-seq:
347
+ * AutoItX3.tool_tip( str [, x = INTDEFAULT, y = INTDEFAULT] ) ==> nil
348
+ * AutoItX3.tooltip( str [, x = INTDEFAULT, y = INTDEFAULT] ) ==> nil
349
+ *
350
+ *Displays a tooltip at the given position. If +x+ and +y+ are ommited,
351
+ *the tooltip will be displayed at the current cursor position. Coordinates
352
+ *out of range are automatically corrected.
353
+ *The tooltip will be deleted when the program ends, or after a system-dependent
354
+ *timeout.
355
+ */
356
+
357
+ /*
358
+ *Document-method: AutoItX3.msleep
359
+ *
360
+ *call-seq:
361
+ * AutoItX3.msleep( msecs ) ==> nil
362
+ *
363
+ *Wait for the specified amount of milliseconds. In AutoIt, this function is named
364
+ *"Sleep", but to avoid compatibility issues with Ruby's own sleep I decided to
365
+ *name the function "msleep" (the "m" indicates "milli"). If you wish to name it
366
+ *"sleep", simply define an alias.
367
+ */
368
+
369
+ //--
370
+ //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
371
+ //END DOCUMENTATION misc.c
372
+ //BEGIN DOCUMENTATION filedir.c
373
+ //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
374
+ //++
375
+
376
+ /*
377
+ *Document-method: AutoItX3.add_drive_map
378
+ *
379
+ *call-seq:
380
+ * AutoItX3.add_drive_map( device , remote_share [, flags [, username [, password ] ] ] ) ==> aString
381
+ *
382
+ *====Arguments
383
+ *- device: The device letter to map the drive to, in the form <tt>"X:"</tt>. If this is an asterisk *, the next available letter will be used.
384
+ *- remote_share: The address of the network drive, in the form <tt>"\\Server\Drive"</tt> or <tt>"\\Server\Share"</tt>.
385
+ *- flags (0): A combination (via +) of 1 (PersistantMapping) and 8 (Show authentification dialog if neccessary).
386
+ *- username (""): The username, of the form <tt>"username"</tt> or <tt>"Domain\username"</tt>.
387
+ *- password (""): The login password.
388
+ *====Description
389
+ *Maps a network drive and raises an Au3Error if the action is not successful.
390
+ */
391
+
392
+ /*
393
+ *Document-method: AutoItX3.delete_drive_map
394
+ *
395
+ *call-seq:
396
+ * AutoItX3.delete_drive_map( device ) ==> true or false
397
+ *
398
+ *Disconnects a network drive. +device+ can be either of form <tt>"X:"</tt> or
399
+ *<tt>"\\Server\share"</tt>.
400
+ */
401
+
402
+ /*
403
+ *Document-method: AutoItX3.get_drive_map
404
+ *
405
+ *call-seq:
406
+ * AutoItX3.get_drive_map( device ) ==> aString
407
+ *
408
+ *Gets the server of the network drive named by +device+ or raises an Au3Error if it
409
+ *can't access the device for some reason. The returned string will be of form
410
+ *<tt>"\\Server\\drive"</tt>.
411
+ */
412
+
413
+ /*
414
+ *Document-method: AutoItX3.delete_ini_entry
415
+ *
416
+ *call-seq:
417
+ * AutoItX3.delete_ini_entry( filename , section , key ) ==> true or false
418
+ *
419
+ *Deletes a key-value pair in a standard <tt>.ini</tt> file.
420
+ */
421
+
422
+ /*
423
+ *Document-method: AutoItX3.read_ini_entry
424
+ *
425
+ *call-seq:
426
+ * AutoItX3.read_ini_entry( filename , section , key , default ) ==> aString
427
+ *
428
+ *Reads a value from a standard <tt>.ini</tt> file or returns the string given by +default+
429
+ *if it can't find the key. The returned string will have a maximum length of 9999 characters.
430
+ */
431
+
432
+ /*
433
+ *Document-method: AutoItX3.write_ini_entry
434
+ *
435
+ *call-seq:
436
+ * AutoItX3.write_ini_entry( filename , section , key , value ) ==> value
437
+ *
438
+ *Writes the specified key-value pair in a <tt>.ini</tt> file. Existing key-value pairs are overwritten.
439
+ *A non-existing file will be created. Raises an Au3Error if +filename+ is read-only.
440
+ */
441
+
442
+ //--
443
+ //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
444
+ //END DOCUMENTATION filedir.c
445
+ //BEGIN DOCUMENTATION graphic.c
446
+ //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
447
+ //++
448
+
449
+ /*
450
+ *Document-method: AutoItX3.pixel_checksum
451
+ *
452
+ *call-seq:
453
+ * AutoItX3.pixel_checksum( x1 , y1 , x2 , y2 [, step = 1] ) ==> anInteger
454
+ *
455
+ *Computes a checksum of the pixels in the specified region. If the checksum
456
+ *changes, that only indidcates that *something* has changed, not *what*.
457
+ *Note that this method may be very time-consuming, so think about increasing the
458
+ *+step+ parameter (but bear in mind that that will generate more inaccurate checksums).
459
+ */
460
+
461
+ /*
462
+ *Document-method: AutoItX3.get_pixel_color
463
+ *
464
+ *call-seq:
465
+ * AutoItX3.get_pixel_color( x , y ) ==> aInteger
466
+ * AutoItX3.pixel_color( x , y ) ==> aInteger
467
+ *
468
+ *Retrieves the *decimal* color value of a pixel. If you want the hexadecimal, use:
469
+ * "#" + AutoItX3.get_pixel_color(x, y).to_s(16).upcase
470
+ *which will return the hexadecimal color string in form <tt>"#RRGGBB"</tt>
471
+ *(unless you changed +ColorMode+ via the #set_option method).
472
+ */
473
+
474
+ /*
475
+ *Document-method: AutoItX3.search_for_pixel
476
+ *
477
+ *call-seq:
478
+ * AutoItX3.search_for_pixel(x1 , y1 , x2 , y2 , color [, shade_variation = 0 [, step = 1 ] ] ) ==> anArray
479
+ * AutoItX3.pixel_search(x1 , y1 , x2 , y2 , color [, shade_variation = 0 [, step = 1 ] ] ) ==> anArray
480
+ * AutoItX3.search_pixel(x1 , y1 , x2 , y2 , color [, shade_variation = 0 [, step = 1 ] ] ) ==> anArray
481
+ *
482
+ *Searches the given area for the given color. +shade_variation+ indicates how big the difference to
483
+ *the searched color can be at max. If +step+ is other than 1, every <tt>step</tt>-th pixel is searched
484
+ *in the area.
485
+ *Return value is a two-element array of form <tt>[x, y]</tt>.
486
+ */
487
+
488
+ //--
489
+ //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
490
+ //END DOCUMENTATION graphic.c
491
+ //BEGIN DOCUMENTATION keyboard.c
492
+ //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
493
+ //++
494
+
495
+ /*
496
+ *Document-method: AutoItX3.send_keys
497
+ *
498
+ *call-seq:
499
+ * AutoItX3.send_keys( keys [, flag = "" ] ) ==> nil
500
+ *
501
+ *Simulates the keystrokes given keystrokes. If you don't
502
+ *set +flag+ to 1, you may use some of the follwing escape
503
+ *sequences in braces { and } (copied from the AutoItX3 help):
504
+ * Escape sequence | Resulting keypress
505
+ * ====================+============================================================
506
+ * ! | !
507
+ * --------------------+------------------------------------------------------------
508
+ * # | #
509
+ * --------------------+------------------------------------------------------------
510
+ * + | +
511
+ * --------------------+------------------------------------------------------------
512
+ * ^ | ^
513
+ * --------------------+------------------------------------------------------------
514
+ * { | {
515
+ * --------------------+------------------------------------------------------------
516
+ * } | }
517
+ * --------------------+------------------------------------------------------------
518
+ * SPACE | SPACE
519
+ * --------------------+------------------------------------------------------------
520
+ * ENTER | Return on the main keyboard
521
+ * --------------------+------------------------------------------------------------
522
+ * ALT | Alt
523
+ * --------------------+------------------------------------------------------------
524
+ * BACKSPACE or BS | Backspace
525
+ * --------------------+------------------------------------------------------------
526
+ * DELETE or DEL | Del
527
+ * --------------------+------------------------------------------------------------
528
+ * UP | Up arrow
529
+ * --------------------+------------------------------------------------------------
530
+ * DOWN | Down arrow
531
+ * --------------------+------------------------------------------------------------
532
+ * LEFT | Left arrow
533
+ * --------------------+------------------------------------------------------------
534
+ * RIGHT | Right arrow
535
+ * --------------------+------------------------------------------------------------
536
+ * HOME | Home
537
+ * --------------------+------------------------------------------------------------
538
+ * END | End
539
+ * --------------------+------------------------------------------------------------
540
+ * ESCAPE or ESC | ESC
541
+ * --------------------+------------------------------------------------------------
542
+ * INSERT or INS | Ins
543
+ * --------------------+------------------------------------------------------------
544
+ * PGUP | Page Up
545
+ * --------------------+------------------------------------------------------------
546
+ * PGDN | Page Down
547
+ * --------------------+------------------------------------------------------------
548
+ * F1 - F12 | Function keys 1 to 12
549
+ * --------------------+------------------------------------------------------------
550
+ * TAB | Tab
551
+ * --------------------+------------------------------------------------------------
552
+ * PRINTSCREEN | Printscreen
553
+ * --------------------+------------------------------------------------------------
554
+ * LWIN | Left Windows key
555
+ * --------------------+------------------------------------------------------------
556
+ * RWIN | Right Windows key
557
+ * --------------------+------------------------------------------------------------
558
+ * NUMLOCK on | NumLock on
559
+ * --------------------+------------------------------------------------------------
560
+ * CAPSLOCK off | CapsLock off
561
+ * --------------------+------------------------------------------------------------
562
+ * SCROLLLOCK toggle | ScrollLock toggle
563
+ * --------------------+------------------------------------------------------------
564
+ * BREAK | For CTRL-Break processing
565
+ * --------------------+------------------------------------------------------------
566
+ * PAUSE | Pause
567
+ * --------------------+------------------------------------------------------------
568
+ * NUMPAD0 - NUMPAD9 | Numpad number keys.
569
+ * --------------------+------------------------------------------------------------
570
+ * NUMPADMUTLT | Numpad Multipy
571
+ * --------------------+------------------------------------------------------------
572
+ * NUMPADADD | Numpad Add
573
+ * --------------------+------------------------------------------------------------
574
+ * NUMPADSUBT | Numpad Subtract
575
+ * --------------------+------------------------------------------------------------
576
+ * NUMPADDIV | Numpad Division
577
+ * --------------------+------------------------------------------------------------
578
+ * NUMPADDOT | Numpad dot
579
+ * --------------------+------------------------------------------------------------
580
+ * NUMPADENTER | Numpad return key
581
+ * --------------------+------------------------------------------------------------
582
+ * APPSKEY | Windows App key
583
+ * --------------------+------------------------------------------------------------
584
+ * LALT | Left Alt key
585
+ * --------------------+------------------------------------------------------------
586
+ * RALT | Right Alt key
587
+ * --------------------+------------------------------------------------------------
588
+ * LCTRL | Left control key
589
+ * --------------------+------------------------------------------------------------
590
+ * LSHIFT | Left Shift key
591
+ * --------------------+------------------------------------------------------------
592
+ * RSHIFT | Right Shift key
593
+ * --------------------+------------------------------------------------------------
594
+ * SLEEP | Computer Sleep key
595
+ * --------------------+------------------------------------------------------------
596
+ * ALTDOWN | Hold Alt down until ALTUP is sent
597
+ * --------------------+------------------------------------------------------------
598
+ * SHIFTDOWN | Hold Shift down until SHIFTUP is sent
599
+ * --------------------+------------------------------------------------------------
600
+ * CTRLDOWN | Hold CTRL down until CTRLUP is sent
601
+ * --------------------+------------------------------------------------------------
602
+ * LWINDOWN | Hold the left Windows key down until LWDINUP is sent
603
+ * --------------------+------------------------------------------------------------
604
+ * RWINDOWN | Hold the right Windows key down until RWINUP is sent
605
+ * --------------------+------------------------------------------------------------
606
+ * ASC nnnn | Send the kombination Alt+nnnn on numpad
607
+ * --------------------+------------------------------------------------------------
608
+ * BROWSER_BACK | 2000/XP Only: Select the browser "back" button
609
+ * --------------------+------------------------------------------------------------
610
+ * BROWSER_FORWARD | 2000/XP Only: Select the browser "forward" button
611
+ * --------------------+------------------------------------------------------------
612
+ * BROWSER_REFRESH | 2000/XP Only: Select the browser "refresh" button
613
+ * --------------------+------------------------------------------------------------
614
+ * BROWSER_STOP | 2000/XP Only: Select the browser "stop" button
615
+ * --------------------+------------------------------------------------------------
616
+ * BROWSER_SEARCH | 2000/XP Only: Select the browser "search" button
617
+ * --------------------+------------------------------------------------------------
618
+ * BROWSER_FAVORITES | 2000/XP Only: Select the browser "favorites" button
619
+ * --------------------+------------------------------------------------------------
620
+ * BROWSER_HOME | 2000/XP Only: Launch the browser and go to the home page
621
+ * --------------------+------------------------------------------------------------
622
+ * VOLUME_MUTE | 2000/XP Only: Mute the volume
623
+ * --------------------+------------------------------------------------------------
624
+ * VOLUME_DOWN | 2000/XP Only: Reduce the volume
625
+ * --------------------+------------------------------------------------------------
626
+ * VOLUME_UP | 2000/XP Only: Increase the volume
627
+ * --------------------+------------------------------------------------------------
628
+ * MEDIA_NEXT | 2000/XP Only: Select next track in media player
629
+ * --------------------+------------------------------------------------------------
630
+ * MEDIA_PREV | 2000/XP Only: Select previous track in media player
631
+ * --------------------+------------------------------------------------------------
632
+ * MEDIA_STOP | 2000/XP Only: Stop media player
633
+ * --------------------+------------------------------------------------------------
634
+ * MEDIA_PLAY_PAUSE | 2000/XP Only: Play/pause media player
635
+ * --------------------+------------------------------------------------------------
636
+ * LAUNCH_MAIL | 2000/XP Only: Launch the email application
637
+ * --------------------+------------------------------------------------------------
638
+ * LAUNCH_MEDIA | 2000/XP Only: Launch media player
639
+ * --------------------+------------------------------------------------------------
640
+ * LAUNCH_APP1 | 2000/XP Only: Launch user app1
641
+ * --------------------+------------------------------------------------------------
642
+ * LAUNCH_APP2 | 2000/XP Only: Launch user app2
643
+ *
644
+ *A "!" in +keys+ indicates an ALT keystroke,
645
+ *the "+" means SHIFT, "^" CTRL
646
+ *and "#" is the Windows key.
647
+ */
648
+
649
+ //--
650
+ //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
651
+ //END DOCUMENTATION keyboard.c
652
+ //BEGIN DOCUMENTATION mouse.c
653
+ //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
654
+ //++
655
+
656
+ /*
657
+ *Document-method: AutoItX3.mouse_click
658
+ *
659
+ *call-seq:
660
+ * AutoItX3.mouse_click( [x [, y [, button [, clicks [speed ] ] ] ] ) ==> nil
661
+ * AutoItX3.click_mouse( [x [, y [, button [, clicks [speed ] ] ] ] ) ==> nil
662
+ *
663
+ *====Arguments
664
+ *- x (INTDEFAULT): The X position. The cursor's current X if not specified.
665
+ *- y (INTDEFAULT): The Y position. The cursor's current Y if not specified.
666
+ *- button("Primary"): The mouse button to click width. On a mouse for left-handed people the right, for right-handed people the left mouse button.
667
+ *- clicks(1): The number of times to click.
668
+ *- speed(10): The speed the mouse cursor will move with. If set to 0, the cursor is set immediatly.
669
+ *
670
+ *Clicks the mouse.
671
+ */
672
+
673
+ /*
674
+ *Document-method: AutoItX3.drag_mouse
675
+ *
676
+ *call-seq:
677
+ * AutoItX3.drag_mouse(x1, y1, x2, y2 [, button [, speed ] ] ) ==> nil
678
+ *
679
+ *Performes a drag & drop operation with the given parameters.
680
+ */
681
+
682
+ /*
683
+ *Document-method: AutoItX3.hold_mouse_down
684
+ *
685
+ *call-seq:
686
+ * AutoItX3.hold_mouse_down( [ button = "Primary" ] ) ==> nil
687
+ * AutoItX3.mouse_down( [ button = "Primary" ] ) ==> nil
688
+ *
689
+ *Holds a mouse button down (the left by default, or the right if mouse buttons are swapped).
690
+ *You should release the mouse button somewhen.
691
+ */
692
+
693
+ /*
694
+ *Document-method: AutoItX3.cursor_id
695
+ *
696
+ *call-seq:
697
+ * AutoItX3.cursor_id ==> aFixnum
698
+ * AutoItX3.get_cursor_id ==> aFixnum
699
+ *
700
+ *Returns one of the *_CURSOR constants to indicate which cursor icon is actually shown.
701
+ */
702
+
703
+ /*
704
+ *Document-method: AutoItX3.cursor_pos
705
+ *
706
+ *call-seq:
707
+ * AutoItX3.cursor_pos ==> anArray
708
+ * AutoItX3.get_cursor_pos ==> anArray
709
+ *
710
+ *Returns the current cursor position in a two-element array of form <tt>[x, y]</tt>.
711
+ */
712
+
713
+ /*
714
+ *Document-method: AutoItX3.move_mouse
715
+ *
716
+ *call-seq:
717
+ * AutoItX3.move_mouse( x , y [, speed = 10 ] ) ==> nil
718
+ * AutoItX3.mouse_move( x , y [, speed = 10 ] ) ==> nil
719
+ *
720
+ *Moves the mouse cursor to the given position. If +speed+ is 0,
721
+ *it's set immediately.
722
+ */
723
+
724
+ /*
725
+ *Document-method: AutoItX3.release_mouse
726
+ *
727
+ *call-seq:
728
+ * AutoItX3.release_mouse( [ button = "Primary" ] ) ==> nil
729
+ * AutoItX3.mouse_up( [ button = "Primary" ] ) ==> nil
730
+ *
731
+ *Releases a mouse button hold down by #hold_mouse_down.
732
+ */
733
+
734
+ /*
735
+ *Document-method: AutoItX3.mouse_wheel
736
+ *
737
+ *call-seq:
738
+ * AutoItX3.mouse_wheel( direction [, times = 5] ) ==> nil
739
+ *
740
+ *Scrolls up or down the mouse wheel +times+ times. Use
741
+ *ether "Up" or "Down" as the value for +direction+.
742
+ */
743
+
744
+ //--
745
+ //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
746
+ //END DOCUMENTATION mouse.c
747
+ //BEGIN DOCUMENTATION process.c
748
+ //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
749
+ //++
750
+
751
+ /*
752
+ *Document-method: AutoItX3.close_process
753
+ *
754
+ *call-seq:
755
+ * AutoItX3.close_process( pid ) ==> nil
756
+ * AutoItX3.kill_process( pid ) ==> nil
757
+ *
758
+ *Closes the given process.
759
+ */
760
+
761
+ /*
762
+ *Document-method: AutoItX3.process_exists?
763
+ *
764
+ *call-seq:
765
+ * AutoItX3.process_exists?( pid ) ==> anInteger or false
766
+ *
767
+ *Checks wheather or not the given name or PID exists. If successful,
768
+ *this method returns the PID of the process.
769
+ */
770
+
771
+ /*
772
+ *Document-method: AutoItX3.set_process_priority
773
+ *
774
+ *call-seq:
775
+ * AutoItX3.set_process_priority( pid , priority ) ==> priority
776
+ *
777
+ *Sets a process's priority. Use one of the *_PRIORITY constants.
778
+ */
779
+
780
+ /*
781
+ *Document-method: AutoItX3.wait_for_process
782
+ *
783
+ *call-seq:
784
+ * AutoItX3.wait_for_process( procname [, timeout ] ) ==> true or false
785
+ *
786
+ *Waits for the given process name to exist. This is the only process-related
787
+ *method that doesn't take a PID, because to wait for a special PID doesn't make
788
+ *sense, since PIDs are generated randomly.
789
+ */
790
+
791
+ /*
792
+ *Document-method: AutoItX3.wait_for_process_close
793
+ *
794
+ *call-seq:
795
+ * AutoItX3.wait_for_process_close( pid [, timeout ] ) ==> true or false
796
+ *
797
+ *Waits for the given process name or PID to disappear.
798
+ */
799
+
800
+ /*
801
+ *Document-method: AutoItX3.run
802
+ *
803
+ *call-seq:
804
+ * AutoItX3.run( name [, workingdir = "" [, flag = 1] ] ) ==> einInteger or nil
805
+ *
806
+ *Runs a program. The program flow continues, if you want to wait for the process to
807
+ *finish, use #run_and_wait.
808
+ *Returns the PID of the created process or nil if there was a failure starting the process.
809
+ *The +flag+ parameter can be one of the SW_HIDE, SW_MINIMZE or SW_MAXIMIZE constants in the Window class
810
+ */
811
+
812
+ /*
813
+ *Document-method: AutoItX3.run_and_wait
814
+ *
815
+ *call-seq:
816
+ * AutoItX3.run_and_wait( name [, workingdir = "" [, flag = 1] ] ) ==> einInteger or nil
817
+ *
818
+ *Runs a program. This method waits until the process has finished and returns
819
+ *the exitcode of the process (or false if there was an error initializing it). If
820
+ *you don't want this behaviour, use #run.
821
+ *The +flag+ parameter can be one of the SW_HIDE, SW_MINIMZE or SW_MAXIMIZE constants in the Window class.
822
+ */
823
+
824
+ /*
825
+ *Document-method: AutoItX3.run_as_set
826
+ *
827
+ *call-seq:
828
+ * AutoItX3.run_as_set( username , domain , password [, options ] ) ==> true
829
+ *
830
+ *Changes the the owner of following #run and #run_and_wait methods to the given
831
+ *user. Raises a NotImplementedError if your system is Win2000 or older.
832
+ */
833
+
834
+ /*
835
+ *Document-method: AutoItX3.shutdown
836
+ *
837
+ *call-seq:
838
+ * AutoItX3.shutdown( code ) ==> true or false
839
+ *
840
+ *Executes one of the the following commands:
841
+ *- SHUTDOWN
842
+ *- REBOOT
843
+ *- LOGOFF
844
+ *You can combine the above actions with the below constants, except
845
+ *LOGOFF and POWER_DOWN. Use the + operator to combine them.
846
+ *- FORCE_CLOSE
847
+ *- POWER_DOWN
848
+ */
849
+
850
+ //--
851
+ //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
852
+ //END DOCUMENTATION process.c
853
+ //BEGIN DOCUMENTATION window.c
854
+ //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
855
+ //++
856
+
857
+ /*
858
+ *Document-method: AutoItX3::Window.new
859
+ *
860
+ *call-seq:
861
+ * AutoItX3::Window.new( title [, text = "" ] ) ==> aWindow
862
+ *
863
+ *Creates a new Window object. This method checks if a window
864
+ *with the given properties exists (via Window.exists?) and raises
865
+ *an Au3Error if it does not. Use Window::DESKTOP_WINDOW as
866
+ *the +title+ to get a window describing the desktop. Use Window::ACTIVE_WINDOW
867
+ *as the +title+ to get a window describing the active (foreground) window.
868
+ */
869
+
870
+ /*
871
+ *Document-method: AutoItX3::Window.exists?
872
+ *
873
+ *call-seq:
874
+ * AutoItX3::Window.exists?( title [, text = "" ] ) ==> true or false
875
+ *
876
+ *Checks if a window with the given properties exists.
877
+ */
878
+
879
+ /*
880
+ *Document-method: AutoItX3::Window.caret_pos
881
+ *
882
+ *call-seq:
883
+ * AutoItX3::Window.caret_pos ==> anArray
884
+ *
885
+ *Returns a two-element array of form <tt>[x , y]</tt> reflecting the
886
+ *position of the caret in the active window. This doesn't work with
887
+ *every window.
888
+ */
889
+
890
+ /*
891
+ *Document-method: AutoItX3::Window.minimize_all
892
+ *
893
+ *call-seq:
894
+ * AutoItX3::Window.minimize_all ==> nil
895
+ *
896
+ *Minimizes all available windows.
897
+ */
898
+
899
+ /*
900
+ *Document-method: AutoItX3::Window.undo_minimize_all
901
+ *
902
+ *call-seq:
903
+ * AutoItX3::Window.undo_minimize_all ==> nil
904
+ *
905
+ *Undoes a previous call to Window.minimize_all.
906
+ */
907
+
908
+ /*
909
+ *Document-method: AutoItX3::Window.wait
910
+ *
911
+ *call-seq:
912
+ * AutoItX3::Window.wait( title [, text [, timeout ] ] ) ==> true or false )
913
+ *
914
+ *Waits for a window with the given properties to exist. You may
915
+ *specify a +timeout+ in seconds. +wait+ normally returns true, but if
916
+ *the timeout is expired, it returns false.
917
+ */
918
+
919
+ /*
920
+ *Document-method: AutoItX3::Window#inspect
921
+ *
922
+ *call-seq:
923
+ * AutoItX3::Window#inspect ==> aString
924
+ *
925
+ *Human-readable output of form <tt>"<Window: WINDOW_TITLE (WINDOW_HANDLE)>"</tt>.
926
+ *The title is determined by calling #title.
927
+ */
928
+
929
+ /*
930
+ *Document-method: AutoItX3::Window#to_s
931
+ *
932
+ *call-seq:
933
+ * AutoItX3::Window#to_s ==> aString
934
+ *
935
+ *Returns +self+'s title.
936
+ */
937
+
938
+ /*
939
+ *Document-method: AutoItX3::Window#to_i
940
+ *
941
+ *call-seq:
942
+ * AutoItX3::Window#to_i ==> anInteger
943
+ *
944
+ *Returns the handle of the window as an integer by calling
945
+ *<tt>.to_i(16)</tt> on the result of #handle.
946
+ */
947
+
948
+ /*
949
+ *Document-method: AutoItX3::Window#activate
950
+ *
951
+ *call-seq:
952
+ * AutoItX3::Window#activate ==> true or false
953
+ *
954
+ *Activates the window and returns true if it was successfully activated.
955
+ */
956
+
957
+ /*
958
+ *Document-method: AutoItX3::Window#active?
959
+ *
960
+ *call-seq:
961
+ * AutoItX3::Window#active? ==> true or false
962
+ *
963
+ *Checks wheather or not the window is active.
964
+ */
965
+
966
+ /*
967
+ *Document-method: AutoItX3::Window#close
968
+ *
969
+ *call-seq:
970
+ * AutoItX3::Window#close ==> nil
971
+ *
972
+ *Sends WM_CLOSE to +self+. WM_CLOSE may be processed by the window,
973
+ *it could, for example, ask to save or the like. If you want to kill a window
974
+ *without giving the ability to process your message, use the #kill method.
975
+ */
976
+
977
+ /*
978
+ *Document-method: AutoItX3::Window#exists?
979
+ *
980
+ *call-seq:
981
+ * AutoItX3::Window#exists? ==> true or false
982
+ *
983
+ *Calls the Window.exists? class method with the values given in Window.new.
984
+ */
985
+
986
+ /*
987
+ *Document-method: AutoItX3::Window#class_list
988
+ *
989
+ *call-seq:
990
+ * AutoItX3::Window#class_list ==> anArray
991
+ *
992
+ *Returns an array of all used window classes of +self+.
993
+ */
994
+
995
+ /*
996
+ *Document-method: AutoItX3::Window#client_size
997
+ *
998
+ *call-seq:
999
+ * AutoItX3::Window#client_size ==> anArray
1000
+ *
1001
+ *Returns the client area size of +self+ as a two-element array of
1002
+ *form <tt>[ width , height ]</tt>. Returns <tt>[0, 0]</tt> on minimized
1003
+ *windows.
1004
+ */
1005
+
1006
+ /*
1007
+ *Document-method: AutoItX3::Window#handle
1008
+ *
1009
+ *call-seq:
1010
+ * AutoItX3::Window#handle ==> aString
1011
+ *
1012
+ *Returns the numeric handle of a window as a string. It can be used
1013
+ *with the WinTitleMatchMode option set to advanced or for direct calls
1014
+ *to the windows API (but you have to call <tt>.to_i(16)</tt> on the string then).
1015
+ */
1016
+
1017
+ /*
1018
+ *Document-method: AutoItX3::Window#rect
1019
+ *
1020
+ *call-seq:
1021
+ * AutoItX3::Window#rect ==> anArray
1022
+ *
1023
+ *Returns the position and size of +self+ in a four-element array
1024
+ *of form <tt>[x, y, width, height]</tt>.
1025
+ */
1026
+
1027
+ /*
1028
+ *Document-method: AutoItX3::Window#pid
1029
+ *
1030
+ *call-seq:
1031
+ * AutoItX3::Window#pid ==> anInteger
1032
+ *
1033
+ *Returns the process identification number of +self+'s window
1034
+ *procedure.
1035
+ */
1036
+
1037
+ /*
1038
+ *Document-method: AutoItX3::Window#visible?
1039
+ *
1040
+ *call-seq:
1041
+ * AutoItX3::Window#visible? ==> true or false
1042
+ *
1043
+ *Returns true if +self+ is shown on the screen.
1044
+ */
1045
+
1046
+ /*
1047
+ *Document-method: AutoItX3::Window#enabled?
1048
+ *
1049
+ *call-seq:
1050
+ * AutoItX3::Window#enabled? ==> true or false
1051
+ *
1052
+ *Returns true if +self+ is enabled (i.e. it can receive input).
1053
+ */
1054
+
1055
+ /*
1056
+ *Document-method: AutoItX3::Window#minimized?
1057
+ *
1058
+ *call-seq:
1059
+ * AutoItX3::Window#minimized? ==> true or false
1060
+ *
1061
+ *Returns true if +self+ is minimized to the taskbar.
1062
+ */
1063
+
1064
+ /*
1065
+ *Document-method: AutoItX3::Window#maximized?
1066
+ *
1067
+ *call-seq:
1068
+ * AutoItX3::Window#maximized? ==> true or false
1069
+ *
1070
+ *Returns true if +self+ is maximized to full screen size.
1071
+ */
1072
+
1073
+ /*
1074
+ *Document-method: AutoItX3::Window#state
1075
+ *
1076
+ *call-seq:
1077
+ * AutoItX3::Window#state ==> anInteger
1078
+ *
1079
+ *Returns the integer composition of the states
1080
+ *- exists (1)
1081
+ *- visible (2)
1082
+ *- enabled (4)
1083
+ *- active (8)
1084
+ *- minimized (16)
1085
+ *- maximized (32)
1086
+ *Use the bit-wise AND operator & to check for a specific state.
1087
+ *Or just use one of the predefined methods #exists?, #visible?,
1088
+ *#enabled?, #active?, #minimized? and #maximized?.
1089
+ */
1090
+
1091
+ /*
1092
+ *Document-method: AutoItX3::Window#text
1093
+ *
1094
+ *call-seq:
1095
+ * AutoItX3::Window#text ==> aString
1096
+ *
1097
+ *Returns the text read from a window. This method does not
1098
+ *affect the @text instance variable, it's a call to the AutoItX3
1099
+ *function <i>WinGetText</i>.
1100
+ */
1101
+
1102
+ /*
1103
+ *Document-method: AutoItX3::Window#title
1104
+ *
1105
+ *call-seq:
1106
+ * AutoItX3::Window#title ==> aString
1107
+ *
1108
+ *Returns the title read from a window. This method does not
1109
+ *affect or even use the value of @title, that means you can use
1110
+ *+title+ to retrieve titles from a window if you're working with the
1111
+ *advanced window mode.
1112
+ */
1113
+
1114
+ /*
1115
+ *Document-method: AutoItX3::Window#kill
1116
+ *
1117
+ *call-seq:
1118
+ * AutoItX3::Window#kill ==> nil
1119
+ *
1120
+ *Kills +self+. This method forces a window to close if it doesn't close
1121
+ *quickly enough (in contrary to #close which waits for user actions
1122
+ *if neccessary). Some windows cannot be +kill+ed (notably
1123
+ *Windows Explorer windows).
1124
+ */
1125
+
1126
+ /*
1127
+ *Document-method: AutoItX3::Window.select_menu_item
1128
+ *
1129
+ *call-seq:
1130
+ * AutoItX3::Window#select_menu_item( menu [, *items ] ) ==> nil
1131
+ *
1132
+ *Clicks the specified item in the specified menu. You may specify up to seven
1133
+ *submenus.
1134
+ *TODO: This function doesn't find any item and so raises an Au3Error.
1135
+ */
1136
+
1137
+ /*
1138
+ *Document-method: AutoItX3::Window#move
1139
+ *
1140
+ *call-seq:
1141
+ * AutoItX3::Window#move( x , y [, width [, height ] ] ) ==> nil
1142
+ *
1143
+ *Moves a window (and optionally resizes it). This does not work
1144
+ *with minimized windows.
1145
+ */
1146
+
1147
+ /*
1148
+ *Document-method: AutoItX3::Window#set_on_top=
1149
+ *
1150
+ *call-seq:
1151
+ * AutoItX3::Window#set_on_top = val ==> val
1152
+ *
1153
+ *Turn the TOPMOST flag of +self+ on or off. If activated, the window
1154
+ *will stay on top over all other windows.
1155
+ */
1156
+
1157
+ /*
1158
+ *Document-method: AutoItX3::Window#state=
1159
+ *
1160
+ *call-seq:
1161
+ * AutoItX3::Window#state = val ==> val
1162
+ *
1163
+ *Sets +self+'s window state to one of the SW_* constants.
1164
+ */
1165
+
1166
+ /*
1167
+ *Document-method: AutoItX3::Window#title=
1168
+ *
1169
+ *call-seq:
1170
+ * AutoItX3::Window#title = val ==> val
1171
+ *
1172
+ *Renames +self+. This does not change the internal @title
1173
+ *instance variable, so you can use this with the
1174
+ *advanced window mode.
1175
+ */
1176
+
1177
+ /*
1178
+ *Document-method: AutoItX3::Window#trans=
1179
+ *
1180
+ *call-seq:
1181
+ * AutoItX3::Window#trans = val ==> val
1182
+ * AutoItX3::Window#transparency = val ==> val
1183
+ *
1184
+ *Sets the transparency of +self+ or raises a NotImplementedError
1185
+ *if the OS is Windows Millenium or older.
1186
+ */
1187
+
1188
+ /*
1189
+ *Document-method: AutoItX3::Window#wait
1190
+ *
1191
+ *call-seq:
1192
+ * AutoItX3::Window#wait( [ timeout = 0 ] ) ==> true or false
1193
+ *
1194
+ *Waits for +self+ to exist. This method calls Window's class
1195
+ *method wait, so see Window.wait for more information.
1196
+ */
1197
+
1198
+ /*
1199
+ *Document-method: AutoItX3::Window#wait_active
1200
+ *
1201
+ *call-seq:
1202
+ * AutoItX3::Window#wait_active( [ timeout = 0 ] ) ==> true or false
1203
+ *
1204
+ *Waits for +self+ to be the active (that is, have the input focus).
1205
+ */
1206
+
1207
+ /*
1208
+ *Document-method: AutoItX3::Window#wait_close
1209
+ *
1210
+ *call-seq:
1211
+ * AutoItX3::Window#wait_close( [timeout = 0] ) ==> true or false
1212
+ *
1213
+ *Waits for +self+ to be closed.
1214
+ */
1215
+
1216
+ /*
1217
+ *Document-method: AutoItX3::Window#wait_not_active
1218
+ *
1219
+ *call-seq:
1220
+ * AutoItX3::Window#wait_not_active( [ timeout = 0 ] ) ==> true or false
1221
+ *
1222
+ *Waits for +self+ to lose the input focus.
1223
+ */
1224
+
1225
+ /*
1226
+ *Document-method: AutoItX3::Window#focused_control
1227
+ *
1228
+ *call-seq:
1229
+ * AutoItX3::Window#focused_control ==> aControl
1230
+ *
1231
+ *Returns the actually focused control in +self+, a AutoItX3::Control object.
1232
+ *Note that if the owning window doesn't have the input focus, you'll get an
1233
+ *unusable Control object back.
1234
+ */
1235
+
1236
+ /*
1237
+ *Document-method: AutoItX3::Window#statusbar_text
1238
+ *
1239
+ *call-seq:
1240
+ * AutoItX3::Window#statusbar_text( [ part = 1 ] ) ==> aString
1241
+ *
1242
+ *Reads the text of the statusbar at position +part+. This method
1243
+ *raises an Au3Error if there's no statusbar, it's not a mscommon
1244
+ *statusbar or if you try to read a position out of range.
1245
+ */
1246
+
1247
+ //--
1248
+ //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
1249
+ //END DOCUMENTATION window.c
1250
+ //BEGIN DOCUMENTATION control.c
1251
+ //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
1252
+ //++
1253
+
1254
+ /*
1255
+ *Document-method: AutoItX3::Control.new
1256
+ *
1257
+ *call-seq:
1258
+ * AutoItX3::Control.new( title , text , control_id ) ==> aControl
1259
+ *
1260
+ *Creates a new Control object. Pass in the title and text of
1261
+ *the window holding the control (or "" if you don't want to specify one of them)
1262
+ *and the ID of the control. Instead of the ID you may use the name of the
1263
+ *control in combination width the occurence number of it, like "Edit1" and "Edit2".
1264
+ */
1265
+
1266
+ /*
1267
+ *Document-method: AutoItX3::Control#click
1268
+ *
1269
+ *call-seq:
1270
+ * AutoItX3::Control#click( [ button [, clicks [, x [, y ] ] ] ] ) ==> true
1271
+ *
1272
+ *Clicks +self+ with the given mouse +button+ (<tt>"Primary"</tt> by default)
1273
+ *+click+ times (1 by default) at the given position (middle by default).
1274
+ */
1275
+
1276
+ /*
1277
+ *Document-method: AutoItX3::Control#disable
1278
+ *
1279
+ *call-seq:
1280
+ * AutoItX3::Control#disable ==> true
1281
+ *
1282
+ *Disables ("grays out") +self+.
1283
+ */
1284
+
1285
+ /*
1286
+ *Document-method: AutoItX3::Control#enable
1287
+ *
1288
+ *call-seq:
1289
+ * AutoItX3::Control#enable ==> true
1290
+ *
1291
+ *Enables +self+ (i.e. make it accept user actions).
1292
+ */
1293
+
1294
+ /*
1295
+ *Document-method: AutoItX3::Control#focus
1296
+ *
1297
+ *call-seq:
1298
+ * AutoItX3::Control#focus ==> true
1299
+ *
1300
+ *Gives the input focus to +self+.
1301
+ */
1302
+
1303
+ /*
1304
+ *Document-method: AutoItX3::Control#handle
1305
+ *
1306
+ *call-seq:
1307
+ * AutoItX3::Control#handle ==> aString
1308
+ *
1309
+ *Returns the internal window handle of +self+. It can be used in
1310
+ *advanced window mode or directly in Win32 API calls (but you have
1311
+ *to call #to_i on the string than).
1312
+ */
1313
+
1314
+ /*
1315
+ *Document-method: AutoItX3::Control#rect
1316
+ *
1317
+ *call-seq:
1318
+ * AutoItX3::Control#rect ==> anArray
1319
+ *
1320
+ *Returns a 4-element array containing the control's position and size.
1321
+ *Form is: <tt>[ x , y , width , height ]</tt>.
1322
+ */
1323
+
1324
+ /*
1325
+ *Document-method: AutoItX3::Control#text
1326
+ *
1327
+ *call-seq:
1328
+ * AutoItX3::Control#text ==> aString
1329
+ *
1330
+ *Returns the +self+'s text.
1331
+ */
1332
+
1333
+ /*
1334
+ *Document-method: AutoItX3::Control#move
1335
+ *
1336
+ *call-seq:
1337
+ * AutoItX3::Control#move( x , y [, width [, height ] ] ) ==> true
1338
+ *
1339
+ *Moves a control and optionally resizes it.
1340
+ */
1341
+
1342
+ /*
1343
+ *Document-method: AutoItX3::Control#send_keys
1344
+ *
1345
+ *call-seq:
1346
+ * AutoItX3::Control#send_keys( str [, flag = 0 ] ) ==> true
1347
+ *
1348
+ *Simulates user input to a control. This works normally even on
1349
+ *hidden and inactive windows. Please note that this method cannot
1350
+ *send every keystroke AutoItX3.send_keys can, notably [ALT] combinations.
1351
+ */
1352
+
1353
+ /*
1354
+ *Document-method: AutoItX3::Control#text=
1355
+ *
1356
+ *call-seq:
1357
+ * AutoItX3::Control#text = str ==> str
1358
+ *
1359
+ *Sets the text of a control directly.
1360
+ */
1361
+
1362
+ /*
1363
+ *Document-method: AutoItX3::Control#show
1364
+ *
1365
+ *call-seq:
1366
+ * AutoItX3::Control#show ==> true
1367
+ *
1368
+ *Shows a hidden control.
1369
+ */
1370
+
1371
+ /*
1372
+ *Document-method: AutoItX3::Control#send_command_to_control
1373
+ *
1374
+ *call-seq:
1375
+ * AutoItX3::Control#send_command_to_control( command [, arg ] ) ==> aString
1376
+ *
1377
+ *Sends a command to a control. You won't need to use this method, since all commands
1378
+ *are wrapped into methods. It's only used internally.
1379
+ */
1380
+
1381
+ /*
1382
+ *Document-method: AutoItX3::Control#visible?
1383
+ *
1384
+ *call-seq:
1385
+ * AutoItX3::Control#visible? ==> true or false
1386
+ *
1387
+ *Returns wheather or not a control is visible.
1388
+ */
1389
+
1390
+ /*
1391
+ *Document-method: AutoItX3::Control#enabled?
1392
+ *
1393
+ *call-seq:
1394
+ * AutoItX3::Control#enabled? ==> true or false
1395
+ *
1396
+ *Returns true if a control can interact with the user (i.e. it's not "grayed out").
1397
+ */
1398
+
1399
+ //--
1400
+ //ListBox class
1401
+ //++
1402
+
1403
+ /*
1404
+ *Document-method: AutoItX3::ListBox#<<
1405
+ *
1406
+ *call-seq:
1407
+ * AutoItX3::ListBox#add( item ) ==> item
1408
+ * AutoItX3::ListBox#<< item ==> self
1409
+ *
1410
+ *Adds an entry to an existing combo or list box.
1411
+ *If you use the << form, you can do a chain call like:
1412
+ * ctrl << "a" << "b" << "c"
1413
+ */
1414
+
1415
+ /*
1416
+ *Document-method: AutoItX3::ListBox#delete
1417
+ *
1418
+ *call-seq:
1419
+ * AutoItX3::ListBox#delete( no ) ==> item
1420
+ *
1421
+ *Delete item +no+.
1422
+ */
1423
+
1424
+ /*
1425
+ *Document-method: AutoItX3::ListBox#find
1426
+ *
1427
+ *call-seq:
1428
+ * AutoItX3::ListBox#find( item ) ==> anInteger
1429
+ *
1430
+ *Finds the item number of +item+ in +self+.
1431
+ */
1432
+
1433
+ /*
1434
+ *Document-method: AutoItX3::ListBox#current_selection=
1435
+ *
1436
+ *call-seq:
1437
+ * AutoItX3::ListBox#current_selection = num ==> num
1438
+ *
1439
+ *Sets the current selection of a combo box to item +num+.
1440
+ *The index is zero-based. Raises an Au3Error if +num+ is out
1441
+ *of range.
1442
+ */
1443
+
1444
+ /*
1445
+ *Document-method: AutoItX3::ListBox#select_string
1446
+ *
1447
+ *call-seq:
1448
+ * AutoItX3::ListBox#select_string( str ) ==> str
1449
+ *
1450
+ *Sets +self+'s selection to the first occurence of +str+.
1451
+ *Raises an Au3Error if +str+ cannot be found.
1452
+ */
1453
+
1454
+ /*
1455
+ *Document-method: AutoItX3::ListBox#current_selection
1456
+ *
1457
+ *call-seq:
1458
+ * AutoItX3::ListBox#current_selection ==> aString
1459
+ *
1460
+ *Returns the currently selected string.
1461
+ */
1462
+
1463
+ //--
1464
+ //ComboBox class
1465
+ //++
1466
+
1467
+ /*
1468
+ *Document-method: AutoItX3::ComboBox#drop
1469
+ *
1470
+ *call-seq:
1471
+ * AutoItX3::ComboBox#drop ==> true
1472
+ *
1473
+ *Drops down a combo box.
1474
+ */
1475
+
1476
+ /*
1477
+ *Document-method: AutoItX3::ComboBox#undrop
1478
+ *
1479
+ *call-seq:
1480
+ * AutoItX3::ComboBox#undrop ==> true
1481
+ * AutoItX3::ComboBox#close ==> true
1482
+ *
1483
+ *Undrops or closes a combo box.
1484
+ */
1485
+
1486
+ //--
1487
+ //Button class
1488
+ //++
1489
+
1490
+ /*
1491
+ *Document-method: AutoItX3::Button#checked?
1492
+ *
1493
+ *call-seq:
1494
+ * AutoItX3::Button#checked? ==> true or false
1495
+ *
1496
+ *Returns wheather +self+ is checked or not.
1497
+ *Only useful for radio and check buttons.
1498
+ */
1499
+
1500
+ /*
1501
+ *Document-method: AutoItX3::Button#check
1502
+ *
1503
+ *call-seq:
1504
+ * AutoItX3::Button#check ==> true
1505
+ *
1506
+ *Checks +self+ if it's a radio or check button.
1507
+ */
1508
+
1509
+ /*
1510
+ *Document-method: AutoItX3::Button#uncheck
1511
+ *
1512
+ *call-seq:
1513
+ * AutoItX3::Button#uncheck ==> true
1514
+ *
1515
+ *Unchecks +self+ if it's a radio or check button.
1516
+ */
1517
+
1518
+ //--
1519
+ //Edit class
1520
+ //++
1521
+
1522
+ /*
1523
+ *Document-method: AutoItX3::Edit#caret_pos
1524
+ *
1525
+ *call-seq:
1526
+ * AutoItX3::Edit#caret_pos ==> anArray
1527
+ *
1528
+ *Returns the current caret position in a 2-element array
1529
+ *of form <tt>[line, column]</tt>.
1530
+ */
1531
+
1532
+ /*
1533
+ *Document-method: AutoItX3::Edit#lines
1534
+ *
1535
+ *call-seq:
1536
+ * AutoItX3::Edit#lines ==> anInteger
1537
+ *
1538
+ *Returns the number of lines in +self+.
1539
+ */
1540
+
1541
+ /*
1542
+ *Document-method: AutoItX3::Edit#selected_text
1543
+ *
1544
+ *call-seq:
1545
+ * AutoItX3::Edit#selected_text ==> aString
1546
+ *
1547
+ *Returns the currently selected text.
1548
+ */
1549
+
1550
+ /*
1551
+ *Document-method: AutoItX3::Edit#paste
1552
+ *
1553
+ *call-seq:
1554
+ * AutoItX3::Edit#paste( str ) ==> str
1555
+ *
1556
+ *"Pastes" +str+ at +self+'s current caret position.
1557
+ */
1558
+
1559
+ //--
1560
+ //TabBook class
1561
+ //++
1562
+
1563
+ /*
1564
+ *Document-method: AutoItX3::TabBook#current
1565
+ *
1566
+ *call-seq:
1567
+ * AutoItX3::TabBook#current ==> anInteger
1568
+ *
1569
+ *Returns the currently shown tab.
1570
+ */
1571
+
1572
+ /*
1573
+ *Document-method: AutoItX3::TabBook#right
1574
+ *
1575
+ *call-seq:
1576
+ * AutoItX3::TabBook#right ==> anInteger
1577
+ *
1578
+ *Shows the tab right to the current one and returns the number
1579
+ *of the now shown tab.
1580
+ */
1581
+
1582
+ /*
1583
+ *Document-method: AutoItX3::TabBook#left
1584
+ *
1585
+ *call-seq:
1586
+ * AutoItX3::TabBook#left ==> anInteger
1587
+ *
1588
+ *Shows the tab left to the current one and returns the number
1589
+ *of the now shown tab.
1590
+ */
1591
+
1592
+ //--
1593
+ //ListView class
1594
+ //++
1595
+
1596
+ /*
1597
+ *Document-method: AutoItX3::ListView#send_command_to_list_view
1598
+ *
1599
+ *call-seq:
1600
+ * AutoItX3::ListView#send_command_to_list_view( cmd [, arg1 [, arg2 ] ] ) ==> aString
1601
+ *
1602
+ *Sends +cmd+ to +self+. This method is only used internally.
1603
+ */
1604
+
1605
+ /*
1606
+ *Document-method: AutoItX3::ListView#deselect
1607
+ *
1608
+ *call-seq:
1609
+ * AutoItX3::ListView#deselect( from [, to ] ) ==> nil
1610
+ *
1611
+ *Deselects the given item(s).
1612
+ */
1613
+
1614
+ /*
1615
+ *Document-method: AutoItX3::ListView#find
1616
+ *
1617
+ *call-seq:
1618
+ * AutoItX3::ListView#find( string [, sub_item ] ) ==> anInteger or false
1619
+ *
1620
+ *Searches for +string+ and +sub_item+ in +self+ and returns the index
1621
+ *of the found list item or false if it isn't found.
1622
+ */
1623
+
1624
+ /*
1625
+ *Document-method: AutoItX3::ListView#item_count
1626
+ *
1627
+ *call-seq:
1628
+ * AutoItX3::ListView#item_count ==> anInteger
1629
+ * AutoItX3::ListView#size ==> anInteger
1630
+ * AutoItX3::ListView#length ==> anInteger
1631
+ *
1632
+ *Returns the number of items in +self+.
1633
+ */
1634
+
1635
+ /*
1636
+ *Document-method: AutoItX3::ListView#selected
1637
+ *
1638
+ *call-seq:
1639
+ * AutoItX3::ListView#selected ==> anArray
1640
+ *
1641
+ *Returns the inices of the selected items in an array which is empty if
1642
+ *none is selected.
1643
+ */
1644
+
1645
+ /*
1646
+ *Document-method: AutoItX3::ListView#num_selected
1647
+ *
1648
+ *call-seq:
1649
+ * AutoItX3::ListView#selected_num ==> anInteger
1650
+ *
1651
+ *Returns the number of selected items.
1652
+ */
1653
+
1654
+ /*
1655
+ *Document-method: AutoItX3::ListView#num_subitems
1656
+ *
1657
+ *call-seq:
1658
+ * AutoItX3::ListView#subitem_num ==> anInteger
1659
+ *
1660
+ *Returns the number of subitems in +self+.
1661
+ */
1662
+
1663
+ /*
1664
+ *Document-method: AutoItX3::ListView#text_at
1665
+ *
1666
+ *call-seq:
1667
+ * AutoItX3::ListView#text_at( item [, subitem ] ) ==> aString
1668
+ * AutoItX3::ListView#[ item [, subitem ] ] ==> aString
1669
+ *
1670
+ *Returns the text at the given position.
1671
+ */
1672
+
1673
+ /*
1674
+ *Document-method: AutoItX3::ListView#selected?
1675
+ *
1676
+ *call-seq:
1677
+ * AutoItX3::ListView#selected?( item ) ==> true or false
1678
+ *
1679
+ *Returns wheather or not +item+ is selected.
1680
+ */
1681
+
1682
+ /*
1683
+ *Document-method: AutoItX3::ListView#select
1684
+ *
1685
+ *call-seq:
1686
+ * AutoItX3::ListView#select( from [, to ] ) ==> nil
1687
+ *
1688
+ *Selects the given item(s).
1689
+ */
1690
+
1691
+ /*
1692
+ *Document-method: AutoItX3::ListView#select_all
1693
+ *
1694
+ *call-seq:
1695
+ * AutoItX3::ListView#select_all ==> nil
1696
+ *
1697
+ *Selects all items in +self+.
1698
+ */
1699
+
1700
+ /*
1701
+ *Document-method: AutoItX3::ListView#clear_selection
1702
+ *
1703
+ *call-seq:
1704
+ * AutoItX3::ListView#clear_selection ==> nil
1705
+ * AutoItX3::ListView#select_none ==> nil
1706
+ *
1707
+ *Clears the selection.
1708
+ */
1709
+
1710
+ /*
1711
+ *Document-method: AutoItX3::ListView#invert_selection
1712
+ *
1713
+ *call-seq:
1714
+ * AutoItX3::ListView#invert_selection ==> nil
1715
+ *
1716
+ *Inverts the selection.
1717
+ */
1718
+
1719
+ /*
1720
+ *Document-method: AutoItX3::ListView#change_view
1721
+ *
1722
+ *call-seq:
1723
+ * AutoItX3::ListView#change_view( view ) ==> view
1724
+ *
1725
+ *Changes the view of +self+. Possible values of +view+ are
1726
+ *all constants of the ListView class.
1727
+ */
1728
+
1729
+ //--
1730
+ //TreeView class
1731
+ //++
1732
+
1733
+ /*
1734
+ *Document-method: AutoItX3::TreeView#send_command_to_tree_view
1735
+ *
1736
+ *call-seq:
1737
+ * AutoItX3::TreeView#send_command_to_tree_view( cmd [, arg1 [, arg2 ] ] ) ==> aString
1738
+ *
1739
+ *Sends +cmd+ to +self+. This method is only used internally.
1740
+ */
1741
+
1742
+ /*
1743
+ *Document-method: AutoItX3::TreeView#check
1744
+ *
1745
+ *call-seq:
1746
+ * AutoItX3::TreeView#check( item ) ==> nil
1747
+ *
1748
+ *Checks +item+ if it supports that operation.
1749
+ */
1750
+
1751
+ /*
1752
+ *Document-method: AutoItX3::TreeView#collapse
1753
+ *
1754
+ *call-seq:
1755
+ * AutoItX3::TreeView#collapse( item ) ==> nil
1756
+ *
1757
+ *Collapses +item+ to hide its children.
1758
+ */
1759
+
1760
+ /*
1761
+ *Document-method: AutoItX3::TreeView#exists?
1762
+ *
1763
+ *call-seq:
1764
+ * AutoItX3::TreeView#exists?( item ) ==> true or false
1765
+ *
1766
+ *Return wheather or not +item+ exists.
1767
+ */
1768
+
1769
+ /*
1770
+ *Document-method: AutoItX3::TreeView#expand
1771
+ *
1772
+ *call-seq:
1773
+ * AutoItX3::TreeView#expand( item ) ==> nil
1774
+ *
1775
+ *Expands +item+ to show its children.
1776
+ */
1777
+
1778
+ /*
1779
+ *Document-method: AutoItX3::TreeView#num_subitems
1780
+ *
1781
+ *call-seq:
1782
+ * AutoItX3::TreeView#num_subitems( item ) ==> anInteger
1783
+ *
1784
+ *Returns the number of children of +item+.
1785
+ */
1786
+
1787
+ /*
1788
+ *Document-method: AutoItX3::TreeView#selected
1789
+ *
1790
+ *call-seq:
1791
+ * AutoItX3::TreeView#selected( use_index = false ) ==> aString or anInteger
1792
+ *
1793
+ *Returns the text reference or the index reference (if +use_index+ is true) of
1794
+ *the selected item.
1795
+ */
1796
+
1797
+ /*
1798
+ *Document-method: AutoItX3::TreeView#text_at
1799
+ *
1800
+ *call-seq:
1801
+ * AutoItX3::TreeView#text_at( item ) ==> aString
1802
+ * AutoItX3::TreeView#[ item ] ==> aString
1803
+ *
1804
+ *Returns the text of +item+.
1805
+ */
1806
+
1807
+ /*
1808
+ *Document-method: AutoItX3::TreeView#checked?
1809
+ *
1810
+ *call-seq:
1811
+ * AutoItX3::TreeView#checked?( item ) ==> true or false
1812
+ *
1813
+ *Returns wheather or not +item+ is checked. Raises an Au3Error
1814
+ *if +item+ is not a checkbox.
1815
+ */
1816
+
1817
+ /*
1818
+ *Document-method: AutoItX3::TreeView#select
1819
+ *
1820
+ *call-seq:
1821
+ * AutoItX3::TreeView#select( item ) ==> nil
1822
+ *
1823
+ *Selects +item+.
1824
+ */
1825
+
1826
+ /*
1827
+ *Document-method: AutoItX3::TreeView#uncheck
1828
+ *
1829
+ *call-seq:
1830
+ * AutoItX3::TreeView#uncheck( item ) ==> nil
1831
+ *
1832
+ *Unchecks +item+ if it suports that operation (i.e. it's a checkbox).
1833
+ */
1834
+
1835
+ //--
1836
+ //================================================================
1837
+ //END DOCUMENTATION
1838
+ //================================================================
1839
+ //++
1840
+
1841
+ #define _CRT_SECURE_NO_DEPRECATE //Warnungen in MSVC ausblenden
1842
+ //Einbinden von Systembibliotheken
1843
+ #include <stdio.h>
1844
+ #include <string.h>
1845
+ #include "Ruby.h"
1846
+ #include "AutoIt3.h"
1847
+
1848
+ //Definieren des AutoItX3-Moduls
1849
+ static VALUE AutoItX3 = Qnil;
1850
+ //Die Errorklasse dieser Library
1851
+ static VALUE Au3Error = Qnil;
1852
+ //Klasse f�r Window-Objekte
1853
+ static VALUE Window = Qnil;
1854
+ //Klasse f�r Control-Objekte
1855
+ static VALUE Control = Qnil;
1856
+ //Klasse f�r ListBoxen
1857
+ static VALUE ListBox = Qnil;
1858
+ //Klasse f�r ComboBoxen
1859
+ static VALUE ComboBox = Qnil;
1860
+ //Klasse f�r Radio-, Check- und normale Buttons
1861
+ static VALUE Button = Qnil;
1862
+ //Klasse f�r Textcontrols (Edits)
1863
+ static VALUE Edit = Qnil;
1864
+ //Klasse f�r SysTabControl32-Controls
1865
+ static VALUE TabBook = Qnil;
1866
+ //Klasse f�r ListView32-Controls
1867
+ static VALUE ListView = Qnil;
1868
+ //Klasse f�r TreeView32-Controls
1869
+ static VALUE TreeView = Qnil;
1870
+
1871
+ //Einbinden eigener Bibliotheken
1872
+ #include "parts/wconv.c"
1873
+ #include "parts/utils.c"
1874
+ //Einbinden der Programmteile
1875
+ #include "parts/misc.c"
1876
+ #include "parts/filedir.c"
1877
+ #include "parts/graphic.c"
1878
+ #include "parts/keyboard.c"
1879
+ #include "parts/mouse.c"
1880
+ #include "parts/process.c"
1881
+ #include "parts/window.c"
1882
+ #include "parts/control.c"
1883
+
1884
+ //Ruby-Initialisierungsfunktion
1885
+ void Init_au3(void)
1886
+ {
1887
+ VALUE au3single = Qnil;
1888
+ //--
1889
+ //========================================================
1890
+ //Erstellen von Klassen und Modulen
1891
+ //========================================================
1892
+ //++
1893
+ AutoItX3 = rb_define_module("AutoItX3");
1894
+ au3single = rb_singleton_class(AutoItX3); //Singletonklasse
1895
+ Au3Error = rb_define_class_under(AutoItX3, "Au3Error", rb_eStandardError);
1896
+ Window = rb_define_class_under(AutoItX3, "Window", rb_cObject);
1897
+ Control = rb_define_class_under(AutoItX3, "Control", rb_cObject);
1898
+ ListBox = rb_define_class_under(AutoItX3, "ListBox", Control);
1899
+ ComboBox = rb_define_class_under(AutoItX3, "ComboBox", ListBox);
1900
+ Button = rb_define_class_under(AutoItX3, "Button", Control);
1901
+ Edit = rb_define_class_under(AutoItX3, "Edit", Control);
1902
+ TabBook = rb_define_class_under(AutoItX3, "TabBook", Control);
1903
+ ListView = rb_define_class_under(AutoItX3, "ListView", Control);
1904
+ TreeView = rb_define_class_under(AutoItX3, "TreeView", Control);
1905
+
1906
+ //--
1907
+ //========================================================
1908
+ //Definieren von Konstanten
1909
+ //========================================================
1910
+ //++
1911
+
1912
+ /*The smallest value AutoIt can handle. Used for *some* parameter defaults. */
1913
+ rb_define_const(AutoItX3, "INTDEFAULT", INT2NUM(-2147483647));
1914
+ /*The version of the AutoItX-Ruby API. */
1915
+ rb_define_const(AutoItX3, "VERSION", rb_str_new2("0.0.1"));
1916
+
1917
+ /*Unknown cursor icon*/
1918
+ rb_define_const(AutoItX3, "UNKNOWN_CURSOR", INT2FIX(0));
1919
+ /*Application starting cursor (arrow with a hourglass next to it)*/
1920
+ rb_define_const(AutoItX3, "APP_STARTING_CURSOR", INT2FIX(1));
1921
+ /*The normal cursor*/
1922
+ rb_define_const(AutoItX3, "ARROW_CURSOR", INT2FIX(2));
1923
+ /*Cross cursor*/
1924
+ rb_define_const(AutoItX3, "CROSS_CURSOR", INT2FIX(3));
1925
+ /*Cursor with a question mark next to it*/
1926
+ rb_define_const(AutoItX3, "HELP_CURSOR", INT2FIX(4));
1927
+ /*Cursor for editing lines of text*/
1928
+ rb_define_const(AutoItX3, "IBEAM_CURSOR", INT2FIX(5));
1929
+ rb_define_const(AutoItX3, "ICON_CURSOR", INT2FIX(6));
1930
+ /*Cursor for forbidden actions (a circle with a strike through it)*/
1931
+ rb_define_const(AutoItX3, "NO_CURSOR", INT2FIX(7));
1932
+ rb_define_const(AutoItX3, "SIZE_CURSOR", INT2FIX(8));
1933
+ rb_define_const(AutoItX3, "SIZE_ALL_CURSOR", INT2FIX(9));
1934
+ rb_define_const(AutoItX3, "SIZE_NESW_CURSOR", INT2FIX(10));
1935
+ rb_define_const(AutoItX3, "SIZE_NS_CURSOR", INT2FIX(11));
1936
+ rb_define_const(AutoItX3, "SIZE_NWSE_CURSOR", INT2FIX(12));
1937
+ rb_define_const(AutoItX3, "SIZE_WE_CURSOR", INT2FIX(13));
1938
+ rb_define_const(AutoItX3, "UP_ARROW_CURSOR", INT2FIX(14));
1939
+ /*Wait (the well-known "hourglass")*/
1940
+ rb_define_const(AutoItX3, "WAIT_CURSOR", INT2FIX(15));
1941
+ /*Lowest process priorety*/
1942
+ rb_define_const(AutoItX3, "IDLE_PRIORETY", INT2FIX(0));
1943
+ /*Subnormal process priority*/
1944
+ rb_define_const(AutoItX3, "SUBNORMAL_PRIORITY", INT2FIX(1));
1945
+ /*Normal process priority*/
1946
+ rb_define_const(AutoItX3, "NORMAL_PRIORITY", INT2FIX(2));
1947
+ /*Process priority above normal*/
1948
+ rb_define_const(AutoItX3, "SUPNORMAL_PRIORITY", INT2FIX(3));
1949
+ /*High process priority*/
1950
+ rb_define_const(AutoItX3, "HIGH_PRIORITY", INT2FIX(4));
1951
+ /*Highest process priority. Use this with caution, it's is the priority system processes run with.*/
1952
+ rb_define_const(AutoItX3, "REALTIME_PRIORITY", INT2FIX(5));
1953
+ /*Logs the currect user out*/
1954
+ rb_define_const(AutoItX3, "LOGOFF", INT2FIX(0));
1955
+ /*Shuts the computer down*/
1956
+ rb_define_const(AutoItX3, "SHUTDOWN", INT2FIX(1));
1957
+ /*Reboot the computer*/
1958
+ rb_define_const(AutoItX3, "REBOOT", INT2FIX(2));
1959
+ /*Force hanging applications to close*/
1960
+ rb_define_const(AutoItX3, "FORCE_CLOSE", INT2FIX(4));
1961
+ /*Turn the power off after shutting down (if the computer supports this)*/
1962
+ rb_define_const(AutoItX3, "POWER_DOWN", INT2FIX(8));
1963
+ /*A window describing the desktop*/
1964
+ rb_define_const(Window, "DESKTOP_WINDOW", rb_str_new2("Program Manager"));
1965
+ /*A window describing the active (foreground) window*/
1966
+ rb_define_const(Window, "ACTIVE_WINDOW", rb_str_new2(""));
1967
+ /*Hide the window*/
1968
+ rb_define_const(Window, "SW_HIDE", LONG2NUM(SW_HIDE));
1969
+ /*Show the window*/
1970
+ rb_define_const(Window, "SW_SHOW", LONG2NUM(SW_SHOW));
1971
+ /*Minimize the window*/
1972
+ rb_define_const(Window, "SW_MINIMIZE", LONG2NUM(SW_MINIMIZE));
1973
+ /*Maximize the window*/
1974
+ rb_define_const(Window, "SW_MAXIMIZE", LONG2NUM(SW_MAXIMIZE));
1975
+ /*Restore a minimized window*/
1976
+ rb_define_const(Window, "SW_RESTORE", LONG2NUM(SW_RESTORE));
1977
+ /*Uses the default SW_ value of the application*/
1978
+ rb_define_const(Window, "SW_SHOWDEFAULT", LONG2NUM(SW_SHOWDEFAULT));
1979
+ /*Same as SW_MINIMIZE, but doesn't activate the window.*/
1980
+ rb_define_const(Window, "SW_SHOWMINNOACTIVE", LONG2NUM(SW_SHOWMINNOACTIVE));
1981
+ /*Same as SW_SHOW, but doesn't activate the window*/
1982
+ rb_define_const(Window, "SW_SHOWNA", LONG2NUM(SW_SHOWNA));
1983
+ /*Ordinary list view*/
1984
+ rb_define_const(ListView, "LIST", rb_str_new2("list"));
1985
+ /*Detailed view*/
1986
+ rb_define_const(ListView, "DETAILS", rb_str_new2("details"));
1987
+ /*View with small icons*/
1988
+ rb_define_const(ListView, "SMALL_ICONS", rb_str_new2("smallicons"));
1989
+ /*View with large icons*/
1990
+ rb_define_const(ListView, "LARGE_ICONS", rb_str_new2("largeicons"));
1991
+
1992
+ //--
1993
+ //========================================================
1994
+ //Definieren von Instant-Variablen
1995
+ //========================================================
1996
+ //++
1997
+
1998
+ /*Set to true if user input is blocked by #block_input= . */
1999
+ rb_ivar_set(AutoItX3, rb_intern("@input_blocked"), Qfalse);
2000
+
2001
+ //--
2002
+ //========================================================
2003
+ //Definieren der Methoden
2004
+ //========================================================
2005
+ //++
2006
+
2007
+ //--
2008
+ //misc.c
2009
+ //++
2010
+
2011
+ rb_define_module_function(AutoItX3, "last_error", method_last_error, 0);
2012
+ rb_define_module_function(AutoItX3, "set_option", method_set_option, 2);
2013
+ rb_define_module_function(AutoItX3, "block_input=", method_block_input, 1);
2014
+ rb_define_module_function(AutoItX3, "input_blocked?", method_input_blocked, 0);
2015
+ rb_define_module_function(AutoItX3, "open_cd_tray", method_open_cd_tray, 1);
2016
+ rb_define_module_function(AutoItX3, "close_cd_tray", method_close_cd_tray, 1);
2017
+ rb_define_module_function(AutoItX3, "is_admin?", method_is_admin, 0);
2018
+ //rb_define_module_function(AutoItX3, "download_file", method_download_file, 2); //This method seems to have been removed.
2019
+ rb_define_module_function(AutoItX3, "cliptext=", method_set_cliptext, 1);
2020
+ rb_define_module_function(AutoItX3, "cliptext", method_get_cliptext, 0);
2021
+ rb_define_module_function(AutoItX3, "tool_tip", method_tool_tip, -1);
2022
+ rb_define_module_function(AutoItX3, "msleep", method_msleep, 1);
2023
+
2024
+ //--
2025
+ //filedir.c
2026
+ //++
2027
+
2028
+ rb_define_module_function(AutoItX3, "add_drive_map", method_add_drive_map, -1);
2029
+ rb_define_module_function(AutoItX3, "delete_drive_map", method_delete_drive_map, 1);
2030
+ rb_define_module_function(AutoItX3, "get_drive_map", method_get_drive_map, 1);
2031
+ rb_define_module_function(AutoItX3, "delete_ini_entry", method_delete_ini_entry, 3);
2032
+ rb_define_module_function(AutoItX3, "read_ini_entry", method_read_ini_entry, 4);
2033
+ rb_define_module_function(AutoItX3, "write_ini_entry", method_write_ini_entry, 4);
2034
+
2035
+ //--
2036
+ //graphic.c
2037
+ //++
2038
+
2039
+ rb_define_module_function(AutoItX3, "pixel_checksum", method_pixel_checksum, -1);
2040
+ rb_define_module_function(AutoItX3, "get_pixel_color", method_get_pixel_color, 2);
2041
+ rb_define_module_function(AutoItX3, "search_for_pixel", method_search_for_pixel, -1);
2042
+
2043
+ //--
2044
+ //keyboard.c
2045
+ //++
2046
+
2047
+ rb_define_module_function(AutoItX3, "send_keys", method_send_keys, -1);
2048
+
2049
+ //--
2050
+ //mouse.c
2051
+ //++
2052
+
2053
+ rb_define_module_function(AutoItX3, "mouse_click", method_mouse_click, -1);
2054
+ rb_define_module_function(AutoItX3, "drag_mouse", method_drag_mouse, -1);
2055
+ rb_define_module_function(AutoItX3, "hold_mouse_down", method_hold_mouse_down, -1);
2056
+ rb_define_module_function(AutoItX3, "cursor_id", method_cursor_id, 0);
2057
+ rb_define_module_function(AutoItX3, "cursor_pos", method_cursor_pos, 0);
2058
+ rb_define_module_function(AutoItX3, "move_mouse", method_move_mouse, -1);
2059
+ rb_define_module_function(AutoItX3, "release_mouse", method_release_mouse, -1);
2060
+ rb_define_module_function(AutoItX3, "mouse_wheel", method_mouse_wheel, -1);
2061
+
2062
+ //--
2063
+ //process.c
2064
+ //++
2065
+
2066
+ rb_define_module_function(AutoItX3, "close_process", method_close_process, 1);
2067
+ rb_define_module_function(AutoItX3, "process_exists?", method_process_exists, 1);
2068
+ rb_define_module_function(AutoItX3, "set_process_priority", method_set_process_priority, 2);
2069
+ rb_define_module_function(AutoItX3, "wait_for_process", method_wait_for_process, -1);
2070
+ rb_define_module_function(AutoItX3, "wait_for_process_close", method_wait_for_process_close, -1);
2071
+ rb_define_module_function(AutoItX3, "run", method_run, -1);
2072
+ rb_define_module_function(AutoItX3, "run_as_set", method_run_as_set, -1);
2073
+ rb_define_module_function(AutoItX3, "run_and_wait", method_run_and_wait, -1);
2074
+ rb_define_module_function(AutoItX3, "shutdown", method_shutdown, -1);
2075
+
2076
+ //--
2077
+ //window.c
2078
+ //++
2079
+
2080
+ rb_define_method(Window, "initialize", method_init_window, -1);
2081
+ rb_define_method(Window, "inspect", method_inspect_window, 0);
2082
+ rb_define_method(Window, "to_s", method_to_s_window, 0);
2083
+ rb_define_method(Window, "to_i", method_to_i_window, 0);
2084
+ rb_define_method(Window, "activate", method_activate, 0);
2085
+ rb_define_method(Window, "active?", method_active, 0);
2086
+ rb_define_method(Window, "exists?", method_exists, 0);
2087
+ rb_define_method(Window, "class_list", method_class_list, 0);
2088
+ rb_define_method(Window, "client_size", method_client_size, 0);
2089
+ rb_define_method(Window, "close", method_close, 0);
2090
+ rb_define_method(Window, "handle", method_handle, 0);
2091
+ rb_define_method(Window, "rect", method_rect, 0);
2092
+ rb_define_method(Window, "pid", method_pid, 0);
2093
+ rb_define_method(Window, "visible?", method_visible, 0);
2094
+ rb_define_method(Window, "enabled?", method_enabled, 0);
2095
+ rb_define_method(Window, "minimized?", method_minimized, 0);
2096
+ rb_define_method(Window, "maximized?", method_maximized, 0);
2097
+ rb_define_method(Window, "state", method_state, 0);
2098
+ rb_define_method(Window, "text", method_text, 0);
2099
+ rb_define_method(Window, "title", method_title, 0);
2100
+ rb_define_method(Window, "kill", method_kill, 0);
2101
+ //WinList is not implemented in AutoItX3.
2102
+ rb_define_method(Window, "select_menu_item", method_select_menu_item, -2);
2103
+ rb_define_method(Window, "move", method_move, -1);
2104
+ rb_define_method(Window, "set_on_top=", method_set_on_top, 1);
2105
+ rb_define_method(Window, "state=", method_set_state, 1);
2106
+ rb_define_method(Window, "title=", method_set_title, 1);
2107
+ rb_define_method(Window, "trans=", method_set_trans, 1);
2108
+ rb_define_method(Window, "wait", method_wait, -1);
2109
+ rb_define_method(Window, "wait_active", method_wait_active, -1);
2110
+ rb_define_method(Window, "wait_close", method_wait_close, -1);
2111
+ rb_define_method(Window, "wait_not_active", method_wait_not_active, -1);
2112
+ rb_define_method(Window, "focused_control", method_focused_control, 0);
2113
+ rb_define_method(Window, "statusbar_text", method_statusbar_text, -1);
2114
+
2115
+ rb_define_singleton_method(Window, "exists?", method_exists_cl, -1);
2116
+ rb_define_singleton_method(Window, "caret_pos", method_caret_pos_cl, 0);
2117
+ rb_define_singleton_method(Window, "minimize_all", method_minimize_all_cl, 0);
2118
+ rb_define_singleton_method(Window, "undo_minimize_all", method_undo_minimize_all_cl, 0);
2119
+ rb_define_singleton_method(Window, "wait", method_wait_cl, -1);
2120
+
2121
+ //--
2122
+ //control.c
2123
+ //++
2124
+
2125
+ rb_define_method(Control, "initialize", method_init_control, 3);
2126
+ rb_define_method(Control, "click", method_click_ctl, -1);
2127
+ rb_define_method(Control, "disable", method_disable_ctl, 0);
2128
+ rb_define_method(Control, "enable", method_enable_ctl, 0);
2129
+ rb_define_method(Control, "focus", method_focus_ctl, 0);
2130
+ rb_define_method(Control, "handle", method_handle_ctl, 0);
2131
+ rb_define_method(Control, "rect", method_rect_ctl, 0);
2132
+ rb_define_method(Control, "text", method_text_ctl, 0);
2133
+ rb_define_method(Control, "move", method_move_ctl, -1);
2134
+ rb_define_method(Control, "send_keys", method_send_keys_ctl, -1);
2135
+ rb_define_method(Control, "text=", method_set_text_ctl, 1);
2136
+ rb_define_method(Control, "show", method_show_ctl, 0);
2137
+ rb_define_private_method(Control, "send_command_to_control", method_send_command_to_control, -1);
2138
+ rb_define_method(Control, "visible?", method_is_visible_ctl, 0);
2139
+ rb_define_method(Control, "enabled?", method_is_enabled_ctl, 0);
2140
+
2141
+ rb_define_method(ListBox, "add", method_add_string_ib, 1);
2142
+ rb_define_method(ListBox, "<<", method_add_string_self_ib, 1);
2143
+ rb_define_method(ListBox, "delete", method_delete_string_ib, 1);
2144
+ rb_define_method(ListBox, "find", method_find_string_ib, 1);
2145
+ rb_define_method(ListBox, "current_selection=", method_set_current_selection_ib, 1);
2146
+ rb_define_method(ListBox, "select_string", method_select_string_ib, 1);
2147
+ rb_define_method(ListBox, "current_selection", method_current_selection_ib, 0);
2148
+
2149
+ rb_define_method(ComboBox, "drop", method_drop_cb, 0);
2150
+ rb_define_method(ComboBox, "undrop", method_undrop_cb, 0);
2151
+
2152
+ rb_define_method(Button, "checked?", method_is_checked_bt, 0);
2153
+ rb_define_method(Button, "check", method_check_bt, 0);
2154
+ rb_define_method(Button, "uncheck", method_uncheck_bt, 0);
2155
+
2156
+ rb_define_method(Edit, "caret_pos", method_caret_pos_ed, 0);
2157
+ rb_define_method(Edit, "lines", method_lines_ed, 0);
2158
+ rb_define_method(Edit, "selected_text", method_selected_text_ed, 0);
2159
+ rb_define_method(Edit, "paste", method_paste_ed, 1);
2160
+
2161
+ rb_define_method(TabBook, "current", method_current_tab, 0);
2162
+ rb_define_method(TabBook, "right", method_right_tab, 0);
2163
+ rb_define_method(TabBook, "left", method_left_tab, 0);
2164
+
2165
+ rb_define_private_method(ListView, "send_command_to_list_view", method_send_command_to_list_view, -1);
2166
+ rb_define_method(ListView, "deselect", method_deselect_lv, -1);
2167
+ rb_define_method(ListView, "find", method_find_lv, -1);
2168
+ rb_define_method(ListView, "item_count", method_item_count_lv, 0);
2169
+ rb_define_method(ListView, "selected", method_selected_lv, 0);
2170
+ rb_define_method(ListView, "num_selected", method_num_selected_lv, 0);
2171
+ rb_define_method(ListView, "num_subitems", method_num_subitems_lv, 0);
2172
+ rb_define_method(ListView, "text_at", method_text_at_lv, -1);
2173
+ rb_define_method(ListView, "selected?", method_is_selected_lv, 1);
2174
+ rb_define_method(ListView, "select", method_select_lv, -1);
2175
+ rb_define_method(ListView, "select_all", method_select_all_lv, 0);
2176
+ rb_define_method(ListView, "clear_selection", method_clear_selection_lv, 0);
2177
+ rb_define_method(ListView, "invert_selection", method_invert_selection_lv, 0);
2178
+ rb_define_method(ListView, "change_view", method_change_view_lv, 1);
2179
+
2180
+ rb_define_private_method(TreeView, "send_command_to_tree_view", method_send_command_to_tree_view, -1);
2181
+ rb_define_method(TreeView, "check", method_check_tv, 1);
2182
+ rb_define_method(TreeView, "collapse", method_collapse_tv, 1);
2183
+ rb_define_method(TreeView, "exists?", method_exists_tv, 1);
2184
+ rb_define_method(TreeView, "num_subitems", method_num_subitems_tv, 1);
2185
+ rb_define_method(TreeView, "selected", method_selected_tv, -1);
2186
+ rb_define_method(TreeView, "text_at", method_text_at_tv, 1);
2187
+ rb_define_method(TreeView, "checked?", method_is_checked_tv, 1);
2188
+ rb_define_method(TreeView, "select", method_select_tv, 1);
2189
+ rb_define_method(TreeView, "uncheck", method_uncheck_tv, 1);
2190
+
2191
+ //--
2192
+ //========================================================
2193
+ //Aliases
2194
+ //========================================================
2195
+ //++
2196
+
2197
+ rb_define_alias(au3single, "opt", "set_option");
2198
+ rb_define_alias(au3single, "write_clipboard", "cliptext=");
2199
+ rb_define_alias(au3single, "read_clipboard", "cliptext");
2200
+ rb_define_alias(au3single, "tooltip", "tool_tip");
2201
+
2202
+ rb_define_alias(au3single, "pixel_color", "get_pixel_color");
2203
+ rb_define_alias(au3single, "pixel_search", "search_for_pixel");
2204
+ rb_define_alias(au3single, "search_pixel", "search_for_pixel");
2205
+
2206
+ rb_define_alias(au3single, "click_mouse", "mouse_click");
2207
+ rb_define_alias(au3single, "mouse_down", "hold_mouse_down");
2208
+ rb_define_alias(au3single, "get_cursor_id", "cursor_id");
2209
+ rb_define_alias(au3single, "get_cursor_pos", "cursor_pos");
2210
+ rb_define_alias(au3single, "mouse_move", "move_mouse");
2211
+ rb_define_alias(au3single, "mouse_up", "release_mouse");
2212
+
2213
+ rb_define_alias(au3single, "kill_process", "close_process");
2214
+
2215
+ rb_define_alias(Window, "transparency=", "trans=");
2216
+
2217
+ rb_define_alias(ComboBox, "close", "undrop");
2218
+
2219
+ rb_define_alias(ListView, "size", "item_count");
2220
+ rb_define_alias(ListView, "length", "item_count");
2221
+ rb_define_alias(ListView, "[]", "text_at");
2222
+ rb_define_alias(ListView, "select_none", "clear_selection");
2223
+
2224
+ rb_define_alias(TreeView, "[]", "text_at");
2225
+ }