vamp-mcp 0.1.9 → 0.2.4

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.

Potentially problematic release.


This version of vamp-mcp might be problematic. Click here for more details.

Files changed (141) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +144 -107
  3. package/THIRD_PARTY_NOTICES.md +32 -27
  4. package/bin/vamp-mcp.mjs +37 -37
  5. package/notices/mcp-virtualbox-LICENSE +21 -21
  6. package/notices/mcp-virtualbox-PROVENANCE.json +37 -37
  7. package/package.json +51 -17
  8. package/runtime/backends/common/Test-Environment.ps1 +7 -6
  9. package/runtime/backends/common/guest-install.json +58 -0
  10. package/runtime/backends/common/guest_install.py +57 -0
  11. package/runtime/backends/common/host-support.cjs +16 -0
  12. package/runtime/backends/common/packer.cjs +16 -0
  13. package/runtime/backends/hyperv/scripts/Manage-Desktop.ps1 +40 -67
  14. package/runtime/backends/hyperv/scripts/Send-InstallerBoot.ps1 +25 -0
  15. package/runtime/backends/kvm/debian-preseed.cfg +35 -35
  16. package/runtime/backends/library/registry.py +77 -77
  17. package/runtime/backends/library/replay.py +154 -154
  18. package/runtime/backends/packer/answer_media.py +16 -0
  19. package/runtime/backends/packer/deploy-hyperv.ps1 +10 -0
  20. package/runtime/backends/packer/drivers.py +49 -0
  21. package/runtime/backends/packer/hyperv-network.ps1 +10 -0
  22. package/runtime/backends/packer/images.py +75 -0
  23. package/runtime/backends/packer/osinfo.py +113 -0
  24. package/runtime/backends/packer/policy.json +15 -0
  25. package/runtime/backends/packer/runner.py +224 -0
  26. package/runtime/backends/packer/templates.py +118 -0
  27. package/runtime/backends/packer/toolchain.py +80 -0
  28. package/runtime/backends/remote_ssh/server.mjs +321 -94
  29. package/runtime/backends/virtualbox/desktop.cjs +37 -0
  30. package/runtime/backends/virtualbox/display.py +101 -101
  31. package/runtime/backends/virtualbox/history.py +139 -139
  32. package/runtime/backends/virtualbox/mouse_click.py +15 -15
  33. package/runtime/backends/virtualbox/mouse_move.py +18 -18
  34. package/runtime/backends/virtualbox/profiles.json +46 -46
  35. package/runtime/backends/virtualbox/provision.py +238 -184
  36. package/runtime/backends/virtualbox/recording_listener.py +29 -29
  37. package/runtime/backends/virtualbox/recordings.py +39 -39
  38. package/runtime/backends/virtualbox/requirements.txt +7 -7
  39. package/runtime/backends/virtualbox/rpas/debian_first_boot/manifest.json +1 -1
  40. package/runtime/backends/virtualbox/rpas/debian_first_boot/run.robot +13 -13
  41. package/runtime/backends/virtualbox/rpas/debian_first_boot/workflow.py +75 -75
  42. package/runtime/backends/virtualbox/rpas/observe/manifest.json +7 -7
  43. package/runtime/backends/virtualbox/rpas/observe/run.robot +13 -13
  44. package/runtime/backends/virtualbox/rpas/observe/workflow.py +14 -14
  45. package/runtime/backends/virtualbox/server.mjs +440 -63
  46. package/runtime/backends/virtualbox/setup_windows_sdk.py +58 -58
  47. package/runtime/backends/virtualbox/shares.py +68 -68
  48. package/runtime/backends/virtualbox/snapshots.py +53 -53
  49. package/runtime/backends/virtualbox/transfers.py +89 -89
  50. package/runtime/backends/virtualbox/vnc.py +61 -61
  51. package/runtime/guest_keys.py +13 -13
  52. package/runtime/guest_setup/http/debian-preseed.cfg +39 -0
  53. package/runtime/guest_setup/http/postdeb.sh +94 -0
  54. package/runtime/guest_setup/http/postwin.ps1 +53 -0
  55. package/runtime/guest_setup/http/setup-all.ps1 +25 -0
  56. package/runtime/guest_setup/http/setup-win.cmd +7 -0
  57. package/runtime/guest_setup/http/setup.ps1 +44 -0
  58. package/runtime/guest_setup/http/setup.sh +50 -0
  59. package/runtime/guest_setup/kvm/setup-debian.sh +73 -0
  60. package/runtime/guest_setup/kvm/setup-windows.ps1 +52 -0
  61. package/runtime/guest_setup/recorder/README.txt +12 -8
  62. package/runtime/guest_setup/recorder/RECORDER-LICENSE +674 -674
  63. package/runtime/guest_setup/recorder/RECORDING-GUIDE.txt +31 -31
  64. package/runtime/guest_setup/recorder/apply-display.py +41 -41
  65. package/runtime/guest_setup/recorder/configure-debian-mirrors.py +62 -62
  66. package/runtime/guest_setup/recorder/configure-gdm.py +23 -0
  67. package/runtime/guest_setup/recorder/configure-session.ps1 +14 -0
  68. package/runtime/guest_setup/recorder/gnome-display.py +60 -60
  69. package/runtime/guest_setup/recorder/install-display-startup.py +67 -39
  70. package/runtime/guest_setup/recorder/install-hypervisor-drivers.ps1 +34 -0
  71. package/runtime/guest_setup/recorder/install-resolution-shortcut.ps1 +36 -0
  72. package/runtime/guest_setup/recorder/postwin.cmd +10 -10
  73. package/runtime/guest_setup/recorder/prepare-recording.py +30 -30
  74. package/runtime/guest_setup/recorder/recorder.zip +0 -0
  75. package/runtime/guest_setup/recorder/requirements-recorder.txt +2 -2
  76. package/runtime/guest_setup/recorder/session-policy.py +22 -0
  77. package/runtime/guest_setup/recorder/set-resolution-registry.ps1 +40 -0
  78. package/runtime/guest_setup/recorder/setup-user.py +53 -35
  79. package/runtime/guest_setup/recorder/setup-win.cmd +4 -11
  80. package/runtime/guest_setup/recorder/setup.ps1 +112 -30
  81. package/runtime/guest_setup/recorder/setup.sh +19 -1
  82. package/runtime/guest_setup/recorder/vamp-recorder.py +148 -148
  83. package/runtime/guest_setup/recorder/verify-recorder.py +4 -4
  84. package/runtime/guest_setup/recorder/windows-display.py +76 -76
  85. package/runtime/guest_setup/requirements.txt +2 -0
  86. package/runtime/guest_setup/setup-all.ps1 +35 -0
  87. package/runtime/guest_setup/setup-all.sh +22 -0
  88. package/runtime/guest_setup/vault/Install-VCRuntime.ps1 +26 -0
  89. package/runtime/guest_setup/vault/setup-guest-vault.ps1 +148 -0
  90. package/runtime/guest_setup/vault/setup-guest-vault.sh +75 -0
  91. package/runtime/recording_converter.py +230 -230
  92. package/runtime/requirements-mcp.txt +11 -11
  93. package/runtime/rpas/README.md +161 -161
  94. package/runtime/rpas/captcha_handoff/manifest.json +27 -27
  95. package/runtime/rpas/captcha_handoff/run.robot +16 -16
  96. package/runtime/rpas/captcha_handoff/workflow.py +11 -11
  97. package/runtime/rpas/common.resource +26 -26
  98. package/runtime/rpas/debian_update/manifest.json +27 -27
  99. package/runtime/rpas/debian_update/run.robot +17 -17
  100. package/runtime/rpas/debian_update/workflow.py +13 -13
  101. package/runtime/rpas/desktop_control/manifest.json +26 -26
  102. package/runtime/rpas/desktop_control/run.robot +27 -27
  103. package/runtime/rpas/desktop_control/workflow.py +51 -51
  104. package/runtime/rpas/firefox_launch/manifest.json +27 -27
  105. package/runtime/rpas/firefox_launch/run.robot +15 -15
  106. package/runtime/rpas/firefox_launch/workflow.py +25 -25
  107. package/runtime/rpas/firefox_naver/manifest.json +27 -27
  108. package/runtime/rpas/firefox_naver/run.robot +21 -21
  109. package/runtime/rpas/firefox_naver/workflow.py +28 -28
  110. package/runtime/rpas/kvm_validation/README.md +11 -11
  111. package/runtime/rpas/kvm_validation/manifest.json +28 -28
  112. package/runtime/rpas/kvm_validation/run.robot +30 -30
  113. package/runtime/rpas/kvm_validation/workflow.py +91 -91
  114. package/runtime/rpas/manifest.schema.json +105 -105
  115. package/runtime/rpas/naver_login/login.robot +25 -25
  116. package/runtime/rpas/naver_login/manifest.json +33 -33
  117. package/runtime/rpas/naver_login/run.robot +20 -20
  118. package/runtime/rpas/naver_login/workflow.py +32 -32
  119. package/runtime/rpas/windows_naver_recorded/README.md +24 -24
  120. package/runtime/rpas/windows_naver_recorded/conversion.json +25 -25
  121. package/runtime/rpas/windows_naver_recorded/manifest.json +28 -28
  122. package/runtime/rpas/windows_naver_recorded/run.robot +37 -37
  123. package/runtime/rpas/windows_naver_recorded/workflow.py +32 -32
  124. package/runtime/scripts/build_recorder_media.py +39 -39
  125. package/runtime/scripts/macos/setup-host.sh +126 -0
  126. package/runtime/scripts/remote_host_setup.sh +7 -4
  127. package/runtime/scripts/script_server.py +571 -0
  128. package/runtime/skills/vamp-rpa-ui-checks/SKILL.md +26 -0
  129. package/runtime/skills/vamp-rpa-ui-checks/agents/openai.yaml +4 -0
  130. package/runtime/skills/vamp-rpa-ui-checks/references/display.md +12 -0
  131. package/runtime/skills/vamp-rpa-ui-checks/references/user-guide.md +51 -0
  132. package/runtime/skills/vamp-ui-cleanup/SKILL.md +15 -0
  133. package/runtime/skills/vamp-ui-cleanup/agents/openai.yaml +4 -0
  134. package/runtime/skills/vamp-ui-validation/SKILL.md +27 -0
  135. package/runtime/skills/vamp-ui-validation/agents/openai.yaml +4 -0
  136. package/runtime/third_party/mcp-virtualbox/scripts/mouse_click.py +65 -65
  137. package/runtime/third_party/pyautogui-recorder/LICENSE +674 -674
  138. package/runtime/third_party/pyautogui-recorder/PROVENANCE.json +16 -16
  139. package/runtime/third_party/pyautogui-recorder/PyAutoGuiRecorder.py +169 -169
  140. package/runtime/third_party/pyautogui-recorder/README.md +53 -53
  141. package/runtime/scripts/build_debian_installer.py +0 -48
@@ -1,16 +1,16 @@
1
- {
2
- "source": "https://github.com/axel-magard/PyAutoGUI-Recorder",
3
- "revision": "6cd48a3bee4ef4dd382e3484feaa4360a37a0a5d",
4
- "license": "GPL-3.0",
5
- "modifications": "None. Runs as a separate guest program; not imported by MIT host code.",
6
- "sha256": {
7
- "LICENSE": "3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986",
8
- "PyAutoGuiRecorder.py": "df3abff4f2904823eae22c687203e92cae39593f7a65595a1f72e2f10437bab5",
9
- "README.md": "f0cc6809485e04809134ff6737b592baaa5baadb51213c56021715b03b2d2ec9",
10
- "images/Download.png": "242dc02436608bec0c8677ba927b7bddfbeddb8b698834be00048f22eb2d4d3b",
11
- "images/Play.png": "d0a418494d846ddbdd385f5b1738c2c52e9313ca3673c19bbc038f88936c4b98",
12
- "images/PyAutoGUI-Recorder.png": "81ebe18c73025b810162c3b0582571d41d8fff72d4a22a35ddc413da4da8a0bf",
13
- "images/Record.png": "0175e93f558261a1e90e11b9b3617e83c4ba323dd1332dc8e75ae528afa4dcfc",
14
- "images/Stop.png": "c9293f53b9ae60986218b14bfce4bfe1ca353948c4b091bc48d0258d6b5564d9"
15
- }
16
- }
1
+ {
2
+ "source": "https://github.com/axel-magard/PyAutoGUI-Recorder",
3
+ "revision": "6cd48a3bee4ef4dd382e3484feaa4360a37a0a5d",
4
+ "license": "GPL-3.0",
5
+ "modifications": "None. Runs as a separate guest program; not imported by MIT host code.",
6
+ "sha256": {
7
+ "LICENSE": "3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986",
8
+ "PyAutoGuiRecorder.py": "df3abff4f2904823eae22c687203e92cae39593f7a65595a1f72e2f10437bab5",
9
+ "README.md": "f0cc6809485e04809134ff6737b592baaa5baadb51213c56021715b03b2d2ec9",
10
+ "images/Download.png": "242dc02436608bec0c8677ba927b7bddfbeddb8b698834be00048f22eb2d4d3b",
11
+ "images/Play.png": "d0a418494d846ddbdd385f5b1738c2c52e9313ca3673c19bbc038f88936c4b98",
12
+ "images/PyAutoGUI-Recorder.png": "81ebe18c73025b810162c3b0582571d41d8fff72d4a22a35ddc413da4da8a0bf",
13
+ "images/Record.png": "0175e93f558261a1e90e11b9b3617e83c4ba323dd1332dc8e75ae528afa4dcfc",
14
+ "images/Stop.png": "c9293f53b9ae60986218b14bfce4bfe1ca353948c4b091bc48d0258d6b5564d9"
15
+ }
16
+ }
@@ -1,169 +1,169 @@
1
- import time
2
- import tkinter as tk
3
- import tkinter.filedialog
4
- import pyautogui
5
- from pynput import mouse, keyboard
6
- from optparse import OptionParser
7
-
8
- class Stopwatch():
9
- def __init__(self):
10
- self.starttime = time.time()
11
- def elapsed(self,reset=False):
12
- t = time.time() - self.starttime
13
- if reset:
14
- self.reset()
15
- return t
16
- def reset(self):
17
- self.starttime = time.time()
18
-
19
- clock = Stopwatch()
20
-
21
- def on_click(x, y, button, pressed):
22
- if not stopRecording:
23
- if pressed:
24
- if button.name == "left":
25
- listbox.insert(tk.END, "pyautogui.click(x=%d, y=%d)" % (x,y))
26
- else:
27
- listbox.insert(tk.END, "pyautogui.click(x=%d, y=%d, button='right')" % (x,y))
28
- listbox.insert(tk.END, "time.sleep(%f)" % clock.elapsed(True))
29
-
30
- def on_press(key):
31
- if not stopRecording:
32
- try:
33
- listbox.insert(tk.END, "pyautogui.keyDown('%s')" % key.name)
34
- except AttributeError:
35
- listbox.insert(tk.END, "pyautogui.keyDown(%s)" % key)
36
- # listbox.insert(tk.END, "time.sleep(%f)" % clock.elapsed(True))
37
-
38
-
39
- def on_release(key):
40
- if not stopRecording:
41
- try:
42
- listbox.insert(tk.END, "pyautogui.keyUp('%s')" % key.name)
43
- except AttributeError:
44
- listbox.insert(tk.END, "pyautogui.keyUp(%s)" % key)
45
- # listbox.insert(tk.END, "time.sleep(%f)" % clock.elapsed(True))
46
-
47
-
48
- listener = mouse.Listener(on_click=on_click)
49
- listener.start()
50
-
51
- listener2 = keyboard.Listener(on_release=on_release,on_press=on_press)
52
- listener2.start()
53
-
54
- def recording():
55
- listbox.insert(tk.END, "pyautogui.moveTo(%d, %d)" % pyautogui.position())
56
- if options.Delay:
57
- listbox.insert(tk.END, "time.sleep(%f)" % options.Delay)
58
- else:
59
- listbox.insert(tk.END, "time.sleep(%f)" % clock.elapsed(True))
60
- if not stopRecording:
61
- root.after(delay*1000, recording)
62
-
63
- def playing():
64
- global stopPlaying, entryIdx
65
- entry = listbox.get(entryIdx)
66
- if entry:
67
- if entryIdx > 1:
68
- eval(entry)
69
- listbox.select_clear(0, tk.END)
70
- listbox.select_set(entryIdx)
71
- listbox.see(entryIdx)
72
- entryIdx += 1
73
- else:
74
- stopPlaying = True
75
- button_p["relief"] = tk.RAISED
76
- button_r["state"] = "normal"
77
- if not stopPlaying:
78
- root.after(1, playing)
79
-
80
- def click_r():
81
- global stopRecording
82
- button_r["relief"] = tk.SUNKEN
83
- button_p["state"] = "disabled"
84
- stopRecording = False
85
- if not options.Delay:
86
- clock.reset()
87
- if options.recordMoves:
88
- root.after(delay, recording)
89
- def click_p():
90
- global stopPlaying
91
- button_p["relief"] = tk.SUNKEN
92
- button_r["state"] = "disabled"
93
- stopPlaying = False
94
- root.after(1, playing)
95
- def click_s():
96
- global stopRecording
97
- stopRecording = True
98
- button_r["state"] = "normal"
99
- button_p["state"] = "normal"
100
- button_r["relief"] = tk.RAISED
101
- button_p["relief"] = tk.RAISED
102
- def click_d():
103
- name = tkinter.filedialog.asksaveasfilename()
104
- if name:
105
- f = open(name,"w")
106
- i = 0
107
- while True:
108
- entry = listbox.get(i)
109
- if entry:
110
- f.write(entry+"\n")
111
- i += 1
112
- else:
113
- break
114
- f.close()
115
-
116
- usage = '''
117
- python3 PyAutoGuiRecorder.oy OPTIONS
118
- '''
119
- parser = OptionParser(usage)
120
- parser.add_option("--delay", dest="Delay", default=0.0, type="float",
121
- help="Replay delay in seconds")
122
- parser.add_option("--recordMoves", dest="recordMoves", action="store_true",
123
- help="Capture simply mouse moves")
124
- options, args = parser.parse_args()
125
-
126
- root = tk.Tk()
127
- title = "PyAutoGuiRecorder Version 1.0"
128
- root.title(title)
129
- delay = 1
130
- stopRecording = True
131
- stopPlaying = True
132
- entryIdx = 0
133
- # Create listbox
134
- frame = tk.Frame(root)
135
- frame.pack(fill=tk.BOTH, expand=True)
136
- frame2 = tk.Frame(frame)
137
- frame2.pack(side=tk.TOP, fill=tk.BOTH, expand=True)
138
-
139
- items = []
140
- list_items = tk.Variable(value=items)
141
- listbox = tk.Listbox(
142
- frame2, listvariable=list_items
143
- )
144
- listbox.pack(side=tk.LEFT, fill=tk.BOTH, expand=True)
145
- scrollbar_v = tk.Scrollbar(frame2, orient="vertical")
146
- scrollbar_v.config(command=listbox.yview)
147
- scrollbar_v.pack(side=tk.RIGHT, fill=tk.BOTH)
148
- listbox.config(yscrollcommand=scrollbar_v.set)
149
- scrollbar_h = tk.Scrollbar(frame, orient="horizontal")
150
- scrollbar_h.config(command=listbox.xview)
151
- scrollbar_h.pack(side=tk.BOTTOM, fill=tk.BOTH)
152
- listbox.config(xscrollcommand=scrollbar_h.set)
153
- listbox.insert(tk.END, "import pyautogui")
154
- listbox.insert(tk.END, "import time")
155
-
156
- # Create buttons
157
- icon1 = tk.PhotoImage(file="./images/Record.png")
158
- button_r = tk.Button(root, text="Record", command=click_r, image=icon1)
159
- button_r.pack(side=tk.LEFT)
160
- icon2 = tk.PhotoImage(file="./images/Play.png")
161
- button_p = tk.Button(root, text="Play", command=click_p, image=icon2)
162
- button_p.pack(side=tk.LEFT)
163
- icon3 = tk.PhotoImage(file="./images/Stop.png")
164
- button_s = tk.Button(root, text="Stop", command=click_s, image=icon3)
165
- button_s.pack(side=tk.LEFT)
166
- icon4 = tk.PhotoImage(file="./images/Download.png")
167
- button_d = tk.Button(root, text="Download", command=click_d, image=icon4)
168
- button_d.pack(side=tk.LEFT)
169
- root.mainloop()
1
+ import time
2
+ import tkinter as tk
3
+ import tkinter.filedialog
4
+ import pyautogui
5
+ from pynput import mouse, keyboard
6
+ from optparse import OptionParser
7
+
8
+ class Stopwatch():
9
+ def __init__(self):
10
+ self.starttime = time.time()
11
+ def elapsed(self,reset=False):
12
+ t = time.time() - self.starttime
13
+ if reset:
14
+ self.reset()
15
+ return t
16
+ def reset(self):
17
+ self.starttime = time.time()
18
+
19
+ clock = Stopwatch()
20
+
21
+ def on_click(x, y, button, pressed):
22
+ if not stopRecording:
23
+ if pressed:
24
+ if button.name == "left":
25
+ listbox.insert(tk.END, "pyautogui.click(x=%d, y=%d)" % (x,y))
26
+ else:
27
+ listbox.insert(tk.END, "pyautogui.click(x=%d, y=%d, button='right')" % (x,y))
28
+ listbox.insert(tk.END, "time.sleep(%f)" % clock.elapsed(True))
29
+
30
+ def on_press(key):
31
+ if not stopRecording:
32
+ try:
33
+ listbox.insert(tk.END, "pyautogui.keyDown('%s')" % key.name)
34
+ except AttributeError:
35
+ listbox.insert(tk.END, "pyautogui.keyDown(%s)" % key)
36
+ # listbox.insert(tk.END, "time.sleep(%f)" % clock.elapsed(True))
37
+
38
+
39
+ def on_release(key):
40
+ if not stopRecording:
41
+ try:
42
+ listbox.insert(tk.END, "pyautogui.keyUp('%s')" % key.name)
43
+ except AttributeError:
44
+ listbox.insert(tk.END, "pyautogui.keyUp(%s)" % key)
45
+ # listbox.insert(tk.END, "time.sleep(%f)" % clock.elapsed(True))
46
+
47
+
48
+ listener = mouse.Listener(on_click=on_click)
49
+ listener.start()
50
+
51
+ listener2 = keyboard.Listener(on_release=on_release,on_press=on_press)
52
+ listener2.start()
53
+
54
+ def recording():
55
+ listbox.insert(tk.END, "pyautogui.moveTo(%d, %d)" % pyautogui.position())
56
+ if options.Delay:
57
+ listbox.insert(tk.END, "time.sleep(%f)" % options.Delay)
58
+ else:
59
+ listbox.insert(tk.END, "time.sleep(%f)" % clock.elapsed(True))
60
+ if not stopRecording:
61
+ root.after(delay*1000, recording)
62
+
63
+ def playing():
64
+ global stopPlaying, entryIdx
65
+ entry = listbox.get(entryIdx)
66
+ if entry:
67
+ if entryIdx > 1:
68
+ eval(entry)
69
+ listbox.select_clear(0, tk.END)
70
+ listbox.select_set(entryIdx)
71
+ listbox.see(entryIdx)
72
+ entryIdx += 1
73
+ else:
74
+ stopPlaying = True
75
+ button_p["relief"] = tk.RAISED
76
+ button_r["state"] = "normal"
77
+ if not stopPlaying:
78
+ root.after(1, playing)
79
+
80
+ def click_r():
81
+ global stopRecording
82
+ button_r["relief"] = tk.SUNKEN
83
+ button_p["state"] = "disabled"
84
+ stopRecording = False
85
+ if not options.Delay:
86
+ clock.reset()
87
+ if options.recordMoves:
88
+ root.after(delay, recording)
89
+ def click_p():
90
+ global stopPlaying
91
+ button_p["relief"] = tk.SUNKEN
92
+ button_r["state"] = "disabled"
93
+ stopPlaying = False
94
+ root.after(1, playing)
95
+ def click_s():
96
+ global stopRecording
97
+ stopRecording = True
98
+ button_r["state"] = "normal"
99
+ button_p["state"] = "normal"
100
+ button_r["relief"] = tk.RAISED
101
+ button_p["relief"] = tk.RAISED
102
+ def click_d():
103
+ name = tkinter.filedialog.asksaveasfilename()
104
+ if name:
105
+ f = open(name,"w")
106
+ i = 0
107
+ while True:
108
+ entry = listbox.get(i)
109
+ if entry:
110
+ f.write(entry+"\n")
111
+ i += 1
112
+ else:
113
+ break
114
+ f.close()
115
+
116
+ usage = '''
117
+ python3 PyAutoGuiRecorder.oy OPTIONS
118
+ '''
119
+ parser = OptionParser(usage)
120
+ parser.add_option("--delay", dest="Delay", default=0.0, type="float",
121
+ help="Replay delay in seconds")
122
+ parser.add_option("--recordMoves", dest="recordMoves", action="store_true",
123
+ help="Capture simply mouse moves")
124
+ options, args = parser.parse_args()
125
+
126
+ root = tk.Tk()
127
+ title = "PyAutoGuiRecorder Version 1.0"
128
+ root.title(title)
129
+ delay = 1
130
+ stopRecording = True
131
+ stopPlaying = True
132
+ entryIdx = 0
133
+ # Create listbox
134
+ frame = tk.Frame(root)
135
+ frame.pack(fill=tk.BOTH, expand=True)
136
+ frame2 = tk.Frame(frame)
137
+ frame2.pack(side=tk.TOP, fill=tk.BOTH, expand=True)
138
+
139
+ items = []
140
+ list_items = tk.Variable(value=items)
141
+ listbox = tk.Listbox(
142
+ frame2, listvariable=list_items
143
+ )
144
+ listbox.pack(side=tk.LEFT, fill=tk.BOTH, expand=True)
145
+ scrollbar_v = tk.Scrollbar(frame2, orient="vertical")
146
+ scrollbar_v.config(command=listbox.yview)
147
+ scrollbar_v.pack(side=tk.RIGHT, fill=tk.BOTH)
148
+ listbox.config(yscrollcommand=scrollbar_v.set)
149
+ scrollbar_h = tk.Scrollbar(frame, orient="horizontal")
150
+ scrollbar_h.config(command=listbox.xview)
151
+ scrollbar_h.pack(side=tk.BOTTOM, fill=tk.BOTH)
152
+ listbox.config(xscrollcommand=scrollbar_h.set)
153
+ listbox.insert(tk.END, "import pyautogui")
154
+ listbox.insert(tk.END, "import time")
155
+
156
+ # Create buttons
157
+ icon1 = tk.PhotoImage(file="./images/Record.png")
158
+ button_r = tk.Button(root, text="Record", command=click_r, image=icon1)
159
+ button_r.pack(side=tk.LEFT)
160
+ icon2 = tk.PhotoImage(file="./images/Play.png")
161
+ button_p = tk.Button(root, text="Play", command=click_p, image=icon2)
162
+ button_p.pack(side=tk.LEFT)
163
+ icon3 = tk.PhotoImage(file="./images/Stop.png")
164
+ button_s = tk.Button(root, text="Stop", command=click_s, image=icon3)
165
+ button_s.pack(side=tk.LEFT)
166
+ icon4 = tk.PhotoImage(file="./images/Download.png")
167
+ button_d = tk.Button(root, text="Download", command=click_d, image=icon4)
168
+ button_d.pack(side=tk.LEFT)
169
+ root.mainloop()
@@ -1,53 +1,53 @@
1
- # PyAutoGUI-Recorder
2
- ## Abstract
3
- A recorder of mouse clicks to generate PyAutoGUI code with a GUI
4
- ## Description
5
- ![PyAutoGUI Recorder GUI](images/PyAutoGUI-Recorder.png)
6
-
7
- PyAutoGUI-Recorder records mouse clicks on the desktop and allows to write Python code to a file based on the pyautogui module. PyAutoGUI-Recorder also captures the delays between mouse clicks and generates the corresponding time.sleep statements in the Python code.
8
-
9
- ![Recording button](images/Record.png)
10
- Use the Recording button to start recording
11
-
12
-
13
- ![Stop button](images/Stop.png)
14
- Use the Stop button to stop recording
15
-
16
- ![Play button](images/Play.png)
17
- Use the Play button to replay previously recorded mouse clicks.
18
-
19
- ![Download button](images/Download.png)
20
- Use the Download button to save Python code to a file
21
-
22
- ## Synopsis
23
- ```
24
- Usage:
25
- python3 PyAutoGuiRecorder.py OPTIONS
26
-
27
-
28
- Options:
29
- -h, --help show this help message and exit
30
- --delay=DELAY Replay delay in seconds
31
- --recordMoves Capture simply mouse moves
32
-
33
- ```
34
-
35
- - Option **--delay** can be used to specify a fixed delay between mouse clicks
36
- - Option **--recordMoves** can be used to in addition to mouse clicks periodically also capture mouse moves
37
-
38
- ## Installation
39
-
40
- Clone this git repo on your computer, then
41
- install missing Python modules:
42
-
43
- ```
44
- pip3 install pyautogui
45
- pip3 install pynput
46
- ```
47
-
48
- ## Limitations
49
-
50
- Due to a [bug](https://github.com/moses-palmer/pynput/issues/614) in pynput package this script only runs on Python up to version 3.9 !
51
-
52
- ## Known problems
53
- - Hotkeys are not properly detected on Windows
1
+ # PyAutoGUI-Recorder
2
+ ## Abstract
3
+ A recorder of mouse clicks to generate PyAutoGUI code with a GUI
4
+ ## Description
5
+ ![PyAutoGUI Recorder GUI](images/PyAutoGUI-Recorder.png)
6
+
7
+ PyAutoGUI-Recorder records mouse clicks on the desktop and allows to write Python code to a file based on the pyautogui module. PyAutoGUI-Recorder also captures the delays between mouse clicks and generates the corresponding time.sleep statements in the Python code.
8
+
9
+ ![Recording button](images/Record.png)
10
+ Use the Recording button to start recording
11
+
12
+
13
+ ![Stop button](images/Stop.png)
14
+ Use the Stop button to stop recording
15
+
16
+ ![Play button](images/Play.png)
17
+ Use the Play button to replay previously recorded mouse clicks.
18
+
19
+ ![Download button](images/Download.png)
20
+ Use the Download button to save Python code to a file
21
+
22
+ ## Synopsis
23
+ ```
24
+ Usage:
25
+ python3 PyAutoGuiRecorder.py OPTIONS
26
+
27
+
28
+ Options:
29
+ -h, --help show this help message and exit
30
+ --delay=DELAY Replay delay in seconds
31
+ --recordMoves Capture simply mouse moves
32
+
33
+ ```
34
+
35
+ - Option **--delay** can be used to specify a fixed delay between mouse clicks
36
+ - Option **--recordMoves** can be used to in addition to mouse clicks periodically also capture mouse moves
37
+
38
+ ## Installation
39
+
40
+ Clone this git repo on your computer, then
41
+ install missing Python modules:
42
+
43
+ ```
44
+ pip3 install pyautogui
45
+ pip3 install pynput
46
+ ```
47
+
48
+ ## Limitations
49
+
50
+ Due to a [bug](https://github.com/moses-palmer/pynput/issues/614) in pynput package this script only runs on Python up to version 3.9 !
51
+
52
+ ## Known problems
53
+ - Hotkeys are not properly detected on Windows
@@ -1,48 +0,0 @@
1
- #!/usr/bin/env python3
2
- """Create an unattended Debian amd64 BIOS installer without modifying the source ISO."""
3
- import argparse
4
- import json
5
- from pathlib import Path
6
- import subprocess
7
-
8
- ROOT = Path(__file__).resolve().parents[1]
9
- CREDENTIALS = {'username': 'vboxuser', 'password': 'password123!', 'public_sandbox_credentials': True}
10
-
11
-
12
- def build(source, output):
13
- source = Path(source).expanduser().resolve(strict=True)
14
- output = Path(output).expanduser().resolve()
15
- if not source.is_file() or source == output or output.exists():
16
- raise ValueError('Choose a readable source ISO and a new output path')
17
- preseed = ROOT / 'backends/kvm/debian-preseed.cfg'
18
- if not preseed.is_file():
19
- raise ValueError('Packaged Debian preseed file is missing')
20
- def run(args):
21
- try:
22
- result = subprocess.run(['xorriso', *map(str, args)], capture_output=True, text=True, timeout=600)
23
- except FileNotFoundError as error:
24
- raise RuntimeError('Install xorriso on the VM host for Debian automatic installation, or choose manual installation') from error
25
- if result.returncode:
26
- raise RuntimeError('Debian installer preparation failed: ' + result.stderr[-1500:])
27
- return result
28
- # Fail before creating a VM/disk if this is not the supported Debian installer layout.
29
- run(['-indev', source, '-ls', '/install.amd/vmlinuz', '/install.amd/initrd.gz', '/isolinux/isolinux.bin'])
30
- output.parent.mkdir(parents=True, exist_ok=True)
31
- menu = output.with_suffix('.isolinux.cfg')
32
- menu.write_text('default vamp\nprompt 0\ntimeout 10\nlabel vamp\n kernel /install.amd/vmlinuz\n append initrd=/install.amd/initrd.gz auto=true priority=critical preseed/file=/cdrom/preseed.cfg console=tty0 --- quiet\n')
33
- result = run(['-indev', source, '-outdev', output, '-boot_image', 'any', 'replay',
34
- '-map', preseed, '/preseed.cfg', '-map', menu, '/isolinux/isolinux.cfg'])
35
- output.with_suffix('.build.log').write_text(result.stdout + '\n' + result.stderr)
36
- return {'status': 'media_built', 'iso': str(output), 'credentials': CREDENTIALS,
37
- 'installation_verified': False, 'recorder_installed_verified': False}
38
-
39
-
40
- if __name__ == '__main__':
41
- parser = argparse.ArgumentParser(description=__doc__)
42
- parser.add_argument('--source', required=True)
43
- parser.add_argument('--output', required=True)
44
- args = parser.parse_args()
45
- try:
46
- print(json.dumps(build(args.source, args.output)))
47
- except (OSError, ValueError, RuntimeError, subprocess.TimeoutExpired) as error:
48
- parser.exit(1, str(error) + '\n')