Method: AutoItX3::Control#move
- Defined in:
- lib/AutoItX3/control.rb
#move(x, y, width = -1,, height = -1)) ⇒ Object
Moves a control and optionally resizes it.
Parameters
x-
The goal X coordinate.
y-
The goal Y coordinate.
width-
(-1) The goal width.
height-
(-1) The goal height.
Return value
nil.
Raises
- Au3Error
-
Control or window not found.
Example
ctrl.move(100, 100)
#Move to (100|100) and resize
ctrl.move(100, 100, 500, 500)
Remarks
If you move or resize a control, the visually shown control may not change, but if you try to click on it after moving it away, you will get to know that it isn’t there anymore.
232 233 234 235 236 237 |
# File 'lib/AutoItX3/control.rb', line 232 def move(x, y, width = -1, height = -1) Control.functions[__method__] ||= AU3_Function.new("ControlMove", 'SSSLLLL', 'L') res = Control.functions[__method__].call(@title.wide, @text.wide, @c_id.wide, x, y, width, height) raise_unfound if res == 0 nil end |