findcontrol 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/bin/FindControlGui.rb
CHANGED
@@ -5,8 +5,6 @@ class FindControlGui
|
|
5
5
|
include GladeGUI
|
6
6
|
include Win32
|
7
7
|
|
8
|
-
|
9
|
-
|
10
8
|
def mousePosition
|
11
9
|
@@getCursorPos ||= Win32API.new("user32", "GetCursorPos", ['P'], 'V')
|
12
10
|
lpPoint = " " * 8 # store two LONGs
|
@@ -14,14 +12,12 @@ class FindControlGui
|
|
14
12
|
lpPoint.unpack("ll") # get the actual values
|
15
13
|
end
|
16
14
|
|
17
|
-
|
18
15
|
def show()
|
19
16
|
load_glade(__FILE__)
|
20
|
-
|
17
|
+
|
21
18
|
my_path = File.expand_path(File.dirname(__FILE__))
|
22
19
|
@proj ||= Proj.new(File.join(my_path,"..", "lib", "testcomplete", "project", "AutomationPathProject", "AutomationPathProject.pjs").gsub("/","\\"))
|
23
20
|
|
24
|
-
@image1 = my_path + "/crosshairs.jpg"
|
25
21
|
set_glade_all()
|
26
22
|
|
27
23
|
target_flags = Gtk::Drag::TARGET_OTHER_APP #useless
|
@@ -30,11 +26,20 @@ class FindControlGui
|
|
30
26
|
button = Gdk::Window::BUTTON1_MASK #mouse button 1
|
31
27
|
|
32
28
|
Gtk::Drag.source_set(@builder["button1"], button, [ ], action)
|
33
|
-
|
34
|
-
|
29
|
+
Gtk::Drag.source_set(@builder["image1"], button, [ ], action)
|
30
|
+
@image1 = my_path + '\\glade\\crosshairs.gif'
|
31
|
+
dst2 = Gdk::Pixbuf.new(@image1)
|
32
|
+
@dst2 = dst2.scale(40, 40, Gdk::Pixbuf::INTERP_HYPER)
|
33
|
+
@builder["image1"].pixbuf = @dst2
|
34
|
+
Gtk::Drag.source_set_icon(@builder["button1"], @dst2)
|
35
35
|
show_window()
|
36
36
|
end
|
37
37
|
|
38
|
+
def button1__drag_begin(*argv)
|
39
|
+
context = argv[1]
|
40
|
+
Gtk::Drag.set_icon(context, @dst2, 20, 20)
|
41
|
+
end
|
42
|
+
|
38
43
|
def button1__drag_failed(*argv)
|
39
44
|
@loc = mousePosition
|
40
45
|
control_path=@proj.get_control_automation_path_from_location(@loc[0], @loc[1], @builder["include_text"].active?)
|
@@ -5,6 +5,7 @@
|
|
5
5
|
<object class="GtkWindow" id="window1">
|
6
6
|
<property name="visible">True</property>
|
7
7
|
<property name="events">GDK_POINTER_MOTION_MASK | GDK_STRUCTURE_MASK</property>
|
8
|
+
<property name="title" translatable="yes">Control Path Finder</property>
|
8
9
|
<property name="resizable">False</property>
|
9
10
|
<property name="modal">True</property>
|
10
11
|
<property name="window_position">mouse</property>
|
@@ -23,6 +24,7 @@
|
|
23
24
|
</object>
|
24
25
|
<packing>
|
25
26
|
<property name="expand">False</property>
|
27
|
+
<property name="padding">2</property>
|
26
28
|
<property name="position">0</property>
|
27
29
|
</packing>
|
28
30
|
</child>
|
@@ -42,13 +44,15 @@
|
|
42
44
|
</child>
|
43
45
|
<child>
|
44
46
|
<object class="GtkButton" id="button1">
|
45
|
-
<property name="label" translatable="yes">
|
47
|
+
<property name="label" translatable="yes">button</property>
|
46
48
|
<property name="visible">True</property>
|
47
49
|
<property name="can_focus">True</property>
|
48
50
|
<property name="receives_default">True</property>
|
49
51
|
<property name="image">image1</property>
|
50
52
|
</object>
|
51
53
|
<packing>
|
54
|
+
<property name="expand">False</property>
|
55
|
+
<property name="fill">False</property>
|
52
56
|
<property name="position">2</property>
|
53
57
|
</packing>
|
54
58
|
</child>
|
@@ -80,6 +84,6 @@
|
|
80
84
|
</object>
|
81
85
|
<object class="GtkImage" id="image1">
|
82
86
|
<property name="visible">True</property>
|
83
|
-
<property name="
|
87
|
+
<property name="events"></property>
|
84
88
|
</object>
|
85
89
|
</interface>
|
data/lib/TCLib.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'win32ole'
|
2
2
|
require 'rubygems'
|
3
|
-
require 'pry'
|
3
|
+
#require 'pry'
|
4
4
|
|
5
5
|
include WIN32OLE::VARIANT
|
6
6
|
|
@@ -151,12 +151,3 @@ class TC
|
|
151
151
|
end
|
152
152
|
end
|
153
153
|
|
154
|
-
if $0 == __FILE__
|
155
|
-
#testId, runId = *ARGV
|
156
|
-
|
157
|
-
#proj = Proj.new("C:\\LeicaAutomation\\LeicaAutomation.pjs")
|
158
|
-
#proj.run_qc_test_or_timeout(testId, runId)
|
159
|
-
|
160
|
-
proj.get_current_control_automation_path
|
161
|
-
|
162
|
-
end
|
@@ -25,7 +25,7 @@
|
|
25
25
|
<Node name="{8ee82d46-af98-4371-988c-39e367c94873}"/>
|
26
26
|
</Node>
|
27
27
|
<Node name="{24b6fa0b-0143-461a-9758-aeb9e9a9428b}">
|
28
|
-
<Prp name="activity" type="S" value="{
|
28
|
+
<Prp name="activity" type="S" value="{9216F808-DE60-489C-AF9C-530CCDDD2B35}"/>
|
29
29
|
</Node>
|
30
30
|
<Node name="{2c786620-2489-4cbb-9c1e-1a94437a9245}">
|
31
31
|
<Node name="{02fa5ea0-4cbc-4d76-93ef-25d3d00bd8d3}">
|
@@ -36,12 +36,12 @@
|
|
36
36
|
<Node name="workspace">
|
37
37
|
<Node name="0">
|
38
38
|
<Node name="editor">
|
39
|
-
<Prp name="editor" type="S" value="{
|
40
|
-
<Prp name="focused" type="S" value="{
|
39
|
+
<Prp name="editor" type="S" value="{5B61B3A0-0AAF-4E5D-B9B3-7053B0B948E8}"/>
|
40
|
+
<Prp name="focused" type="S" value="{8AAE8824-3CE3-4AA1-A1ED-7FB7331E5A9D}"/>
|
41
41
|
</Node>
|
42
42
|
<Prp name="edititem" type="S" value="{25C37806-ADF4-46DA-8ACE-9899FCA45EC6}"/>
|
43
43
|
</Node>
|
44
|
-
<Prp name="docking" type="H" value="
|
44
|
+
<Prp name="docking" type="H" value="617162696E00000001000000BF0100007801730C74F177F6E664800231209DCCCAC0E0C20C13C14797314264EF783F7BEFDEFAD17971E7F52BA56F6439196D811220131E4D8EEF98AF1DE2BDE9C4E1835E49C7A33480E2D380E2DD6C0C0C4730AD60C1671948EE3F141C029A73020B1FAF7E9063E743552CD89C18BD9E2BD66FE7E682E00D3B3D5E6803253701E5DA800E3B80EC302EA06070496251894240627A2A03036D9D08751DF114002D784C0D"/>
|
45
45
|
<Prp name="enabled" type="B" value="-1"/>
|
46
46
|
</Node>
|
47
47
|
</Node>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: findcontrol
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir:
|
11
11
|
- .
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-02-
|
13
|
+
date: 2013-02-22 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: vrlib
|
@@ -119,5 +119,5 @@ rubyforge_project: nowarning
|
|
119
119
|
rubygems_version: 1.8.24
|
120
120
|
signing_key:
|
121
121
|
specification_version: 3
|
122
|
-
summary: SpyApp for detecting control automation paths
|
122
|
+
summary: SpyApp for detecting control automation paths. Requires TestComplete8
|
123
123
|
test_files: []
|