auto_click is a gem pretty much used for manipulating keyboard/mouse via
ruby script.
The command below will take the mouse's cursor to the given co-ordinates
mouse_move(100,100)
if you do
mouse_move(0,0) the cursor will go to the top-left corner of the screen
Now I want to pass the co-ordinates via a variable
So far, I haven't found any smart way to do it.
Let's look what irb thinks of it below.
DL is deprecated, please use Fiddle
irb(main):001:0> require 'auto_click'
=> true
irb(main):002:0> coordinate = "100,100"
=> "100,100"
irb(main):003:0> mouse_move("#{coordinate}")
ArgumentError: wrong number of arguments (1 for 2)
from
C:/Ruby200/lib/ruby/gems/2.0.0/gems/auto_click-0.2.0/lib/auto_click
.rb:21:in `mouse_move'
from (irb):3
from C:/Ruby200/bin/irb:12:in `<main>'
irb(main):004:0>
On Wed, Feb 19, 2014 at 9:11 AM, cynic limbu <lists@ruby-forum.com> wrote:
auto_click is a gem pretty much used for manipulating keyboard/mouse via
ruby script.
The command below will take the mouse's cursor to the given co-ordinates
mouse_move(100,100)
if you do
mouse_move(0,0) the cursor will go to the top-left corner of the screen
Now I want to pass the co-ordinates via a variable
So far, I haven't found any smart way to do it.
Let's look what irb thinks of it below.
DL is deprecated, please use Fiddle
irb(main):001:0> require 'auto_click'
=> true
irb(main):002:0> coordinate = "100,100"
=> "100,100"
irb(main):003:0> mouse_move("#{coordinate}")
ArgumentError: wrong number of arguments (1 for 2)
from
C:/Ruby200/lib/ruby/gems/2.0.0/gems/auto_click-0.2.0/lib/auto_click
.rb:21:in `mouse_move'
from (irb):3
from C:/Ruby200/bin/irb:12:in `<main>'
irb(main):004:0>