auto_click 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +3 -0
- data/README.rdoc +10 -3
- data/auto_click.gemspec +3 -3
- data/lib/auto_click.rb +22 -1
- data/lib/auto_click/version.rb +1 -1
- metadata +6 -6
data/CHANGELOG
CHANGED
data/README.rdoc
CHANGED
@@ -4,9 +4,9 @@ Ruby gem for simulating mouse clicks and mouse cursor movement.
|
|
4
4
|
|
5
5
|
== Description
|
6
6
|
|
7
|
-
Provide several Ruby methods for simulating mouse click and cursor movement in Windows.
|
8
|
-
This gem use DL library and SendInput method so there is no dependency on FFI or Win32-api.
|
9
|
-
Currently
|
7
|
+
Provide several Ruby methods for simulating mouse click and cursor movement in Windows.
|
8
|
+
This gem use DL library and SendInput method so there is no dependency on FFI, AutoIt or Win32-api.
|
9
|
+
Currently contains 7 methods (mouse_move(x,y), left_click, right_click, cursor_position, mouse_scroll, left_drag and right drag).
|
10
10
|
More control over mouse movement such as speed or locus will be implemented in future releases.
|
11
11
|
|
12
12
|
== Install
|
@@ -38,6 +38,9 @@ To scroll up (forward) 10 wheel steps
|
|
38
38
|
To scroll down (backward) 5 wheel steps
|
39
39
|
|
40
40
|
mouse_scroll(-5)
|
41
|
+
|
42
|
+
To drag the icon on (50,50) to (200,300)
|
43
|
+
left_drag(50,50,200,300)
|
41
44
|
|
42
45
|
|
43
46
|
== Method List
|
@@ -51,6 +54,10 @@ To scroll down (backward) 5 wheel steps
|
|
51
54
|
- mouse_move(x,y)
|
52
55
|
|
53
56
|
- mouse_scroll(d)
|
57
|
+
|
58
|
+
- left_drag(sx,sy,ex,ey)
|
59
|
+
|
60
|
+
- right_drag(sx,sy,ex,ey)
|
54
61
|
|
55
62
|
== Tested with
|
56
63
|
|
data/auto_click.gemspec
CHANGED
@@ -10,9 +10,9 @@ Gem::Specification.new do |s|
|
|
10
10
|
s.email = ["erinata@gmail.com"]
|
11
11
|
s.homepage = ""
|
12
12
|
s.summary = %q{Smulating mouse click and cursor movement}
|
13
|
-
s.description = %q{Provide several Ruby methods for simulating mouse click and cursor movement in Windows
|
14
|
-
This gem use DL library and SendInput method so there is no dependency on FFI or Win32-api
|
15
|
-
Currently
|
13
|
+
s.description = %q{Provide several Ruby methods for simulating mouse click and cursor movement in Windows.\n
|
14
|
+
This gem use DL library and SendInput method so there is no dependency on FFI, AutoIt or Win32-api.\n
|
15
|
+
Currently contains 7 methods (mouse_move(x,y), left_click, right_click, cursor_position, mouse_scroll, left_drag and right drag).\n
|
16
16
|
More control over mouse movement such as speed or locus will be implemented in future releases.}
|
17
17
|
|
18
18
|
s.required_ruby_version = '>= 1.9.0'
|
data/lib/auto_click.rb
CHANGED
@@ -61,7 +61,28 @@ module AutoClick
|
|
61
61
|
scroll = InputStructure.mouse_input(0,0,d*120,0x0800)
|
62
62
|
send_input( [scroll])
|
63
63
|
end
|
64
|
-
|
64
|
+
|
65
|
+
def left_drag(sx,sy,ex,ey)
|
66
|
+
mouse_move sx,sy
|
67
|
+
sleep 0.1
|
68
|
+
send_input( [@@leftdown] )
|
69
|
+
sleep 0.1
|
70
|
+
mouse_move ex,ey
|
71
|
+
sleep 0.1
|
72
|
+
send_input( [@@leftup] )
|
73
|
+
sleep 0.1
|
74
|
+
end
|
75
|
+
|
76
|
+
def right_drag(sx,sy,ex,ey)
|
77
|
+
mouse_move sx,sy
|
78
|
+
sleep 0.1
|
79
|
+
send_input( [@@rightdown] )
|
80
|
+
sleep 0.1
|
81
|
+
mouse_move ex,ey
|
82
|
+
sleep 0.1
|
83
|
+
send_input( [@@rightup] )
|
84
|
+
sleep 0.1
|
85
|
+
end
|
65
86
|
end
|
66
87
|
|
67
88
|
|
data/lib/auto_click/version.rb
CHANGED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
8
|
+
- 4
|
9
|
+
version: 0.1.4
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- erinata
|
@@ -14,14 +14,14 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date:
|
17
|
+
date: 2011-01-03 00:00:00 -06:00
|
18
18
|
default_executable:
|
19
19
|
dependencies: []
|
20
20
|
|
21
21
|
description: |-
|
22
|
-
Provide several Ruby methods for simulating mouse click and cursor movement in Windows
|
23
|
-
This gem use DL library and SendInput method so there is no dependency on FFI or Win32-api
|
24
|
-
Currently
|
22
|
+
Provide several Ruby methods for simulating mouse click and cursor movement in Windows.\n
|
23
|
+
This gem use DL library and SendInput method so there is no dependency on FFI, AutoIt or Win32-api.\n
|
24
|
+
Currently contains 7 methods (mouse_move(x,y), left_click, right_click, cursor_position, mouse_scroll, left_drag and right drag).\n
|
25
25
|
More control over mouse movement such as speed or locus will be implemented in future releases.
|
26
26
|
email:
|
27
27
|
- erinata@gmail.com
|