-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
David Pratmarty
committed
Apr 29, 2021
1 parent
3293a1e
commit 722a9dd
Showing
9 changed files
with
194 additions
and
77 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# coding: utf-8 | ||
import time | ||
import os | ||
import shutil | ||
from dp_toolbox import * | ||
from pywinauto_recorder.player import * | ||
from pathlib import Path | ||
|
||
|
||
if __name__ == '__main__': | ||
os.chdir(os.path.dirname(os.path.abspath(__file__))) | ||
|
||
brian = Voice(name='Brian') | ||
obs = OBSStudio() | ||
|
||
##################################################################### | ||
# Copy script in Data to 'Pywinauto Recorder' folder in Home folder # | ||
##################################################################### | ||
shutil.copy(Path("Data")/Path("recorded Mon Apr 5 16_28_28 2021.py"), Path.home()/Path("Pywinauto recorder")) | ||
|
||
|
||
#################################### | ||
# Open 'Pywinauto Recorder' folder # | ||
#################################### | ||
brian.say("The generated file is in 'Pywinauto Recorder' folder under your home folder.") | ||
time.sleep(1.5) | ||
with Window(u"||List"): | ||
double_left_click("Home||ListItem") | ||
time.sleep(1.5) | ||
send_keys("{LWIN down}""{VK_RIGHT}""{LWIN up}") | ||
with Window("C:\\Users\\d_pra||Window"): | ||
double_left_click("*->Shell Folder View||Pane->Items View||List->Pywinauto recorder||ListItem->Name||Edit") | ||
|
||
############################################################# | ||
# Drag and drop the recorded file on pywinauto_recorder.exe # | ||
############################################################# | ||
with Window("C:\\\\Users\\\\.*\\\\Pywinauto recorder||Window", regex_title=True): | ||
drag_and_drop_start = find("*->Shell Folder View||Pane->Items View||List->||ListItem->Name||Edit#[0,0]") | ||
drag_and_drop_start.draw_outline(colour='blue') | ||
with Window("||List"): | ||
drag_and_drop_end = find(u"Pywinauto recorder||ListItem") | ||
drag_and_drop_end.draw_outline() | ||
#with Window(u"Program Manager||Pane"): | ||
# drag_and_drop_end = find(u"Desktop||List->Pywinauto recorder||ListItem") | ||
# drag_and_drop_end.draw_outline() | ||
|
||
time.sleep(1) | ||
drag_and_drop(drag_and_drop_start, drag_and_drop_end) | ||
brian.say("Thanks for watching! In the next tutorial, you will see how to make a robust recorded script. See you soon!", wait_until_the_end_of_the_sentence=True) | ||
|
||
obs.stop_recording() | ||
time.sleep(1) | ||
obs.quit() | ||
|
||
|
||
exit(0) | ||
|
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Calculator||Window->Calculator||Window->||Group | ||
Number pad||Group | ||
Zero||Button | ||
One||Button | ||
Two||Button | ||
Three||Button | ||
Four||Button | ||
Five||Button | ||
Six||Button | ||
Seven||Button | ||
Eight||Button | ||
Nine||Button | ||
Standard operators | ||
Divide by||Button | ||
Multiply by||Button | ||
Minus||Button | ||
Plus||Button | ||
Equals||Button |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.