Module: Sikuli::Typeable

Included in:
Region
Defined in:
lib/sikuli/typeable.rb

Instance Method Summary collapse

Instance Method Details

#type(text, modifier = 0) ⇒ Object

Public: Types text as if it was being typed on the keyboard with an optional key modifier

text - String representing text to be typed on keyboard modifier - (optional) Sikilu constant (defined in key_code.rb) representing key to hold while typing text

Examples

region.type("Hello World")
region.type("s", Sikuli::KEY_CMD) # saves a file

Returns nothing



19
20
21
# File 'lib/sikuli/typeable.rb', line 19

def type(text, modifier = 0)
  @java_obj.type(nil, text, modifier)
end