x11_client 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -0
- data/README.md +27 -0
- data/Rakefile +32 -0
- data/ext/x11_client_ext/ruby18_compat.h +15 -0
- data/ext/x11_client_ext/x11_client.h +1 -0
- data/ext/x11_client_ext/x11_client_event.c +15 -8
- data/ext/x11_client_ext/x11_client_ext.c +3 -0
- data/ext/x11_client_ext/x11_client_keyboard.c +35 -0
- data/ext/x11_client_ext/x11_client_keyboard.h +3 -0
- data/ext/x11_client_ext/x11_client_window.c +12 -8
- data/lib/x11_client.rb +37 -0
- data/lib/x11_client/keysym.rb +2428 -0
- data/samples/accept_skype_terms.rb +29 -0
- data/x11_client.gemspec +1 -1
- metadata +27 -39
@@ -0,0 +1,29 @@
|
|
1
|
+
$:.unshift File.expand_path("../../lib")
|
2
|
+
|
3
|
+
require "x11_client"
|
4
|
+
|
5
|
+
client = X11Client.new(":0")
|
6
|
+
|
7
|
+
client.start do |event|
|
8
|
+
|
9
|
+
case event['type']
|
10
|
+
when 'CreateWindowEvent'
|
11
|
+
window = client.get_window(event["window_id"])
|
12
|
+
next unless window
|
13
|
+
|
14
|
+
case window['class']
|
15
|
+
when /skype/i
|
16
|
+
case window['name']
|
17
|
+
when /End User License Agreement/i
|
18
|
+
# Accept Skype Agreement
|
19
|
+
client.mousemove(window['x'] + 500, window['y'] + 340)
|
20
|
+
client.sync
|
21
|
+
sleep(1)
|
22
|
+
client.mouseclick(1)
|
23
|
+
client.stop
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
data/x11_client.gemspec
CHANGED
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "x11_client"
|
6
|
-
s.version = "0.0.
|
6
|
+
s.version = "0.0.4"
|
7
7
|
s.authors = ["Andriy Yanko"]
|
8
8
|
s.email = ["andriy.yanko@gmail.com"]
|
9
9
|
s.homepage = "https://github.com/ayanko/x11_client"
|
metadata
CHANGED
@@ -1,38 +1,30 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: x11_client
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 0
|
9
|
-
- 3
|
10
|
-
version: 0.0.3
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Andriy Yanko
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
date: 2011-11-10 00:00:00 Z
|
12
|
+
date: 2011-11-19 00:00:00.000000000 Z
|
19
13
|
dependencies: []
|
20
|
-
|
21
14
|
description: X11 client
|
22
|
-
email:
|
15
|
+
email:
|
23
16
|
- andriy.yanko@gmail.com
|
24
17
|
executables: []
|
25
|
-
|
26
|
-
extensions:
|
18
|
+
extensions:
|
27
19
|
- ext/x11_client_ext/extconf.rb
|
28
20
|
extra_rdoc_files: []
|
29
|
-
|
30
|
-
files:
|
21
|
+
files:
|
31
22
|
- .gitignore
|
32
23
|
- Gemfile
|
33
24
|
- README.md
|
34
25
|
- Rakefile
|
35
26
|
- ext/x11_client_ext/extconf.rb
|
27
|
+
- ext/x11_client_ext/ruby18_compat.h
|
36
28
|
- ext/x11_client_ext/x11_client.h
|
37
29
|
- ext/x11_client_ext/x11_client_core.c
|
38
30
|
- ext/x11_client_ext/x11_client_core.h
|
@@ -41,6 +33,8 @@ files:
|
|
41
33
|
- ext/x11_client_ext/x11_client_event.c
|
42
34
|
- ext/x11_client_ext/x11_client_event.h
|
43
35
|
- ext/x11_client_ext/x11_client_ext.c
|
36
|
+
- ext/x11_client_ext/x11_client_keyboard.c
|
37
|
+
- ext/x11_client_ext/x11_client_keyboard.h
|
44
38
|
- ext/x11_client_ext/x11_client_mouse.c
|
45
39
|
- ext/x11_client_ext/x11_client_mouse.h
|
46
40
|
- ext/x11_client_ext/x11_client_utils.c
|
@@ -48,42 +42,36 @@ files:
|
|
48
42
|
- ext/x11_client_ext/x11_client_window.c
|
49
43
|
- ext/x11_client_ext/x11_client_window.h
|
50
44
|
- lib/x11_client.rb
|
45
|
+
- lib/x11_client/keysym.rb
|
46
|
+
- samples/accept_skype_terms.rb
|
51
47
|
- spec/spec_helper.rb
|
52
48
|
- spec/x11_client_spec.rb
|
53
49
|
- x11_client.gemspec
|
54
50
|
homepage: https://github.com/ayanko/x11_client
|
55
51
|
licenses: []
|
56
|
-
|
57
52
|
post_install_message:
|
58
53
|
rdoc_options: []
|
59
|
-
|
60
|
-
require_paths:
|
54
|
+
require_paths:
|
61
55
|
- lib
|
62
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
56
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
63
57
|
none: false
|
64
|
-
requirements:
|
65
|
-
- -
|
66
|
-
- !ruby/object:Gem::Version
|
67
|
-
|
68
|
-
|
69
|
-
- 0
|
70
|
-
version: "0"
|
71
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
72
63
|
none: false
|
73
|
-
requirements:
|
74
|
-
- -
|
75
|
-
- !ruby/object:Gem::Version
|
76
|
-
|
77
|
-
segments:
|
78
|
-
- 0
|
79
|
-
version: "0"
|
64
|
+
requirements:
|
65
|
+
- - ! '>='
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0'
|
80
68
|
requirements: []
|
81
|
-
|
82
69
|
rubyforge_project: x11_client
|
83
|
-
rubygems_version: 1.8.
|
70
|
+
rubygems_version: 1.8.10
|
84
71
|
signing_key:
|
85
72
|
specification_version: 3
|
86
73
|
summary: X11 client
|
87
|
-
test_files:
|
74
|
+
test_files:
|
88
75
|
- spec/spec_helper.rb
|
89
76
|
- spec/x11_client_spec.rb
|
77
|
+
has_rdoc:
|