Method: AutoItX3::Window#text

Defined in:
lib/AutoItX3/window.rb

#textObject

Returns the text read from a window. This method doesn’t query the @text instance variable, rather it calls the AU3_WinGetText function.



268
269
270
271
272
273
274
# File 'lib/AutoItX3/window.rb', line 268

def text
  Window.functions[__method__] ||= AU3_Function.new("WinGetText", 'SSPI')
  buffer = " " * AutoItX3::BUFFER_SIZE
  buffer.wide!
  Window.functions[__method__].call(@title.wide, @text.wide, buffer, AutoItX3::BUFFER_SIZE - 1)
  buffer.normal.strip
end