-
Notifications
You must be signed in to change notification settings - Fork 1
/
win_auto_test.py
30 lines (23 loc) · 1 KB
/
win_auto_test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
from win_auto import WinAutoCommand, WinAutoFolderStructure, SysFolder, Api
import os, shutil, subprocess
from xml.etree.ElementTree import fromstring
# WinAutoCommand('/ListRunning').run()
# xml = WinAutoCommand('/getallfolders', 'console').run()
# # print(xml)
# # print(str(xml).replace('\\r\\n', ''))
# # print('lala')
# sys_root_folder = SysProcessFolder(os.path.join(os.path.dirname(os.path.realpath(__file__)), 'processes'))
# sys_root_folder.clear()
# structure = WinAutoFolderStructure(xml, sys_root_folder)
# # print(structure.root.Folders.Folder.Folders.children)
# structure.create_folder_structure()
# structure.export_processes()
# WinAutoStructure(str(xml))
# def run_command_and_parse_xml(args):
# args = ['c:\Program Files\WinAutomation\WinAutomationController.exe'] + args
# xml = subprocess.check_output(args)
# return xml
# winauto_processes_folders = run_command_and_parse_xml(['/getallfolders', 'console'])
# print(winauto_processes_folders)
# Api()._make_backup()
Api().import_()