Class: AutoItX3::Button

Inherits:
Control show all
Defined in:
lib/AutoItX3/control.rb

Overview

A button is a control on which you can click and than something happens. Even if that’s quite correct, that isn’t all: check and radio boxes are handled by Windows as buttons, so they fall into the scope of this class.

Instance Method Summary collapse

Methods inherited from Control

#click, #disable, #enable, #enabled?, #focus, from_control, functions, functions=, #handle, #hide, #initialize, #move, #rect, #send_command_to_control, #send_keys, #show, #text, #text=, #visible?

Constructor Details

This class inherits a constructor from AutoItX3::Control

Instance Method Details

#checkObject

Checks self if it’s a radio or check button.



290
291
292
# File 'lib/AutoItX3/control.rb', line 290

def check
  send_command_to_control("Check")
end

#checked?Boolean

Returns wheather self is checked or not. Only useful for radio and check buttons.

Returns:

  • (Boolean)


285
286
287
# File 'lib/AutoItX3/control.rb', line 285

def checked?
  send_command_to_control("IsChecked") == 1
end

#uncheckObject

Unchecks self if it’s a radio or check button.



295
296
297
# File 'lib/AutoItX3/control.rb', line 295

def uncheck
  send_command_to_control("UnCheck")
end