auto_click 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG +3 -0
- data/Gemfile +2 -0
- data/README.rdoc +7 -1
- data/Rakefile +3 -0
- data/lib/auto_click.rb +5 -4
- data/lib/auto_click/input_structure.rb +0 -1
- data/lib/auto_click/user32.rb +2 -2
- data/lib/auto_click/version.rb +1 -1
- data/lib/auto_click/virtual_key.rb +2 -2
- metadata +13 -17
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: bb1c3b5d61b5f4998b061b364a3ec9d0aa64f129
|
4
|
+
data.tar.gz: d569868f75ee1de80a58679ab2bf434a47bae2ce
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 36dadba35007541fdb5acf1a4c84ca721bd44e6616919de3fe6344c43fcfb962bbbf60d9587e3665e5dde6e3816a63885efaeee1967fd7a74a863d59556eec96
|
7
|
+
data.tar.gz: 5472cf43025984ff588d58f1b63a576c40644cf3150aedcabed222b83356e0577e312557c068f55be4dca3b07faf6982a58abeb1769b380c111cdabc2630fe97
|
data/CHANGELOG
CHANGED
data/Gemfile
CHANGED
data/README.rdoc
CHANGED
@@ -19,7 +19,7 @@ To move the mouse cursor to 50,50 ( the top left corner is 0,0) and perform a do
|
|
19
19
|
mouse_move(50,50)
|
20
20
|
double_click
|
21
21
|
|
22
|
-
To move the mouse cursor to
|
22
|
+
To move the mouse cursor to 50,50 and perform a right click:
|
23
23
|
|
24
24
|
mouse_move(50,50)
|
25
25
|
right_click
|
@@ -32,7 +32,13 @@ To scroll down (backward) 5 wheel steps:
|
|
32
32
|
|
33
33
|
mouse_scroll(-5)
|
34
34
|
|
35
|
+
To get the current cursor position
|
36
|
+
|
37
|
+
cursor_position
|
38
|
+
|
35
39
|
To drag the icon on (50,50) to (200,300):
|
40
|
+
|
41
|
+
|
36
42
|
|
37
43
|
left_drag(50,50,200,300)
|
38
44
|
|
data/Rakefile
CHANGED
data/lib/auto_click.rb
CHANGED
@@ -1,17 +1,17 @@
|
|
1
|
-
require '
|
1
|
+
require 'fiddle/import'
|
2
2
|
require 'auto_click/input_structure'
|
3
3
|
require 'auto_click/virtual_key'
|
4
4
|
require 'auto_click/user32'
|
5
|
-
|
5
|
+
|
6
6
|
module AutoClick
|
7
|
-
|
8
7
|
@@rightdown = InputStructure.mouse_input(0,0,0,0x0008)
|
9
8
|
@@rightup = InputStructure.mouse_input(0,0,0,0x0010)
|
10
9
|
@@leftdown = InputStructure.mouse_input(0,0,0,0x0002)
|
11
10
|
@@leftup = InputStructure.mouse_input(0,0,0,0x0004)
|
12
11
|
@@middledown = InputStructure.mouse_input(0,0,0,0x0020)
|
13
12
|
@@middleup = InputStructure.mouse_input(0,0,0,0x0040)
|
14
|
-
|
13
|
+
|
14
|
+
|
15
15
|
def send_input(inputs)
|
16
16
|
n = inputs.size
|
17
17
|
ptr = inputs.collect {|i| i.to_s}.join
|
@@ -96,6 +96,7 @@ module AutoClick
|
|
96
96
|
send_input( [scroll])
|
97
97
|
end
|
98
98
|
|
99
|
+
|
99
100
|
def left_drag(sx,sy,ex,ey)
|
100
101
|
mouse_move sx,sy
|
101
102
|
sleep 0.1
|
data/lib/auto_click/user32.rb
CHANGED
data/lib/auto_click/version.rb
CHANGED
metadata
CHANGED
@@ -1,18 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: auto_click
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease: !!null
|
4
|
+
version: 0.3.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- erinata
|
9
|
-
autorequire:
|
8
|
+
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
13
|
-
default_executable: !!null
|
11
|
+
date: 2017-06-03 00:00:00.000000000 Z
|
14
12
|
dependencies: []
|
15
|
-
description:
|
13
|
+
description: "Provide several Ruby methods for simulating mouse click, cursor movement
|
16
14
|
and keystrokes in Windows. \n This gem use DL library and SendInput
|
17
15
|
method so there is no dependency on FFI, AutoIt or Win32-api. \n Methods
|
18
16
|
include mouse_move(x,y), left_click, right_click, type(string), mouse_scroll(steps),
|
@@ -25,7 +23,7 @@ executables: []
|
|
25
23
|
extensions: []
|
26
24
|
extra_rdoc_files: []
|
27
25
|
files:
|
28
|
-
- .gitignore
|
26
|
+
- ".gitignore"
|
29
27
|
- CHANGELOG
|
30
28
|
- Gemfile
|
31
29
|
- Gemfile.lock
|
@@ -37,29 +35,27 @@ files:
|
|
37
35
|
- lib/auto_click/user32.rb
|
38
36
|
- lib/auto_click/version.rb
|
39
37
|
- lib/auto_click/virtual_key.rb
|
40
|
-
has_rdoc: true
|
41
38
|
homepage: https://github.com/erinata/auto_click
|
42
39
|
licenses: []
|
43
|
-
|
40
|
+
metadata: {}
|
41
|
+
post_install_message:
|
44
42
|
rdoc_options: []
|
45
43
|
require_paths:
|
46
44
|
- lib
|
47
45
|
required_ruby_version: !ruby/object:Gem::Requirement
|
48
|
-
none: false
|
49
46
|
requirements:
|
50
|
-
- -
|
47
|
+
- - ">="
|
51
48
|
- !ruby/object:Gem::Version
|
52
49
|
version: 1.9.0
|
53
50
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
54
|
-
none: false
|
55
51
|
requirements:
|
56
|
-
- -
|
52
|
+
- - ">="
|
57
53
|
- !ruby/object:Gem::Version
|
58
54
|
version: '0'
|
59
55
|
requirements: []
|
60
|
-
rubyforge_project:
|
61
|
-
rubygems_version:
|
62
|
-
signing_key:
|
63
|
-
specification_version:
|
56
|
+
rubyforge_project:
|
57
|
+
rubygems_version: 2.6.8
|
58
|
+
signing_key:
|
59
|
+
specification_version: 4
|
64
60
|
summary: Smulating mouse click, cursor movement and keystrokes
|
65
61
|
test_files: []
|