Method: AutoItX3::Window#initialize
- Defined in:
- lib/AutoItX3/window.rb
#initialize(title, text = "") ⇒ Window
Creates a new Window object. This method checks if a window with the given properties exists (via Window.exists?) and raises an Au3Error if it does not. Use Window::DESKTOP_WINDOW as the title to get a window describing the desktop. Use Window::ACTIVE_WINDOW as the title to get a window describing the active (foreground) window.
100 101 102 103 104 |
# File 'lib/AutoItX3/window.rb', line 100 def initialize(title, text = "") @title = title @text = text raise(Au3Error, "Can't get a handle to a non-existing window!") unless Window.exists?(@title, @text) end |