Last active
July 8, 2019 19:28
-
-
Save burque505/898d5e6373ad749e2be4654cc44626c9 to your computer and use it in GitHub Desktop.
G1ANT script automating PyQT5 widget examples
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-Adjust pathnames to suit. | |
-This script was created at 125% scaling. As th script relies to some degree on mouse position, | |
-you may very well have to change the mouse coordinates to suit. | |
-The python code is available at https://build-system.fman.io/static/public/files/widgets_example_pyside.py | |
-The WindowSpy on the left is from one of my favorites tools, AutoHotkey! | |
addon images version 4.100.19170.929 | |
addon ui version 4.100.19170.929 | |
addon core version 4.100.19170.929 | |
addon language version 4.100.19170.929 | |
♥macronamespaces⟦⟧=System.Diagnostics | |
⊂ | |
string argies = @"/C python C:\Users\burque505\Documents\G1ANT.Robot\widgets_example_pyside.pyw"; | |
System.Diagnostics.Process process = new System.Diagnostics.Process(); | |
System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo(); | |
startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; | |
startInfo.FileName = "cmd.exe"; | |
startInfo.Arguments = argies; | |
process.StartInfo = startInfo; | |
process.Start(); | |
⊃ | |
delay 5 | |
ui.click wpath ‴/ui[@name='Common Qt Widgets']/descendant::ui[@name='Table']/ui[@name='Text Edit']‴ | |
mouse.move 100⫽300 relative true | |
mouse.click | |
keyboard ⋘CTRL+A⋙ | |
♥snakemessage = ‴This is a message to the Python from G1ANT.⋘ENTER⋙All your bases are belong to us!!!!!!!‴ | |
keyboard ♥snakemessage | |
delay 2 | |
ui.click wpath ‴/ui[@name='Common Qt Widgets']/descendant::ui[@name='Text Edit']/ui[@name='Table']‴ | |
delay milliseconds 200 | |
keyboard ‴1 snake down‴ | |
delay milliseconds 200 | |
keyboard ⋘DOWN⋙ | |
delay milliseconds 200 | |
keyboard ‴2 snakes down‴ | |
keyboard ⋘DOWN⋙ | |
delay milliseconds 200 | |
keyboard ‴3 snakes down‴ | |
delay milliseconds 200 | |
keyboard ⋘UP⋙⋘UP⋙⋘UP⋙⋘TAB⋙ | |
delay milliseconds 200 | |
keyboard ‴Got it, Python?‴ | |
delay milliseconds 2000 | |
ui.click wpath ‴/ui[@name='Common Qt Widgets']/ui[@name='Group 1']/ui[@name='Radio button 3']‴ | |
delay 1 | |
ui.click wpath ‴/ui[@name='Common Qt Widgets']/ui[@name='Group 1']/ui[@name='Radio button 2']‴ | |
delay 1 | |
ui.click wpath ‴/ui[@name='Common Qt Widgets']/ui[@name='Group 1']/ui[@name='Tri-state check box']‴ | |
delay 1 | |
ui.click wpath ‴/ui[@name='Common Qt Widgets']/ui[@name='Group 1']/ui[@name='Tri-state check box']‴ | |
delay 1 | |
ui.click wpath ‴/ui[@name='Common Qt Widgets']/ui[@name='Group 1']/ui[@name='Tri-state check box']‴ | |
ui.click wpath ‴/ui[@name='Common Qt Widgets']/ui[@name='Style:']‴ | |
- Here it would be convenient to declare an Anchor, for mouse clicks relative to it. | |
delay 1 | |
mouse.click ⟦point⟧154⫽58 | |
delay milliseconds 100 | |
mouse.click ⟦point⟧154⫽88 | |
delay 2 | |
mouse.click ⟦point⟧154⫽58 | |
delay milliseconds 100 | |
mouse.click ⟦point⟧154⫽118 | |
delay 2 | |
mouse.click ⟦point⟧154⫽58 | |
delay milliseconds 100 | |
mouse.click ⟦point⟧154⫽38 | |
delay 2 | |
mouse.click ⟦point⟧288⫽264 | |
delay 2 | |
mouse.click ⟦point⟧288⫽264 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Removed "⊂⊃" at line 11. My apologies.
Regards,
burque505