FIx minor bugs from impress
This commit is contained in:
@@ -267,19 +267,17 @@ def check_left_panel(accessibility_tree):
|
||||
root = ET.fromstring(accessibility_tree)
|
||||
|
||||
for root_pane in root.iter('root-pane'):
|
||||
for split_pane in root_pane.iter('split-pane'):
|
||||
for panel in split_pane.iter('panel'):
|
||||
for scroll_panel in panel.iter('scroll-pane'):
|
||||
for document_frame in scroll_panel.iter('document-frame'):
|
||||
# Get the left panel
|
||||
panel_name = document_frame.get("name")
|
||||
# visible = scroll_bar.attrib.get(f"{{{namespaces['st']}}}visible")
|
||||
if panel_name == "Slides View":
|
||||
# Left panel is open
|
||||
return 1.0
|
||||
for panel in root_pane.iter('panel'):
|
||||
for split_pane in panel.iter('split-pane'):
|
||||
# Get the left panel
|
||||
if split_pane.attrib.get("{{{}}}parentcoord".format(namespaces['cp'])) == "(0, 0)":
|
||||
# Get the visible attribute
|
||||
visible = split_pane.attrib.get("{{{}}}visible".format(namespaces['st']))
|
||||
if visible:
|
||||
# decide if it is left panel
|
||||
return 1.
|
||||
|
||||
# Left panel is not open
|
||||
return 0.0
|
||||
return 0.
|
||||
|
||||
|
||||
def check_transition(pptx_file, rules):
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
"command": [
|
||||
"python",
|
||||
"-c",
|
||||
"import pyautogui; import time; pyautogui.click(960, 540); time.sleep(0.5); pyautogui.press('esc'); time.sleep(0.3); pyautogui.press('f10'); time.sleep(0.3); pyautogui.press('right', presses=2, interval=0.1); time.sleep(0.3); pyautogui.press('down', presses=11, interval=0.1); pyautogui.press('enter')"
|
||||
"import pyautogui; import time; pyautogui.click(960, 540); time.sleep(5); pyautogui.press('esc'); time.sleep(0.3); pyautogui.press('f10'); time.sleep(0.3); pyautogui.press('right', presses=2, interval=0.1); time.sleep(0.3); pyautogui.press('down', presses=11, interval=0.1); pyautogui.press('enter')"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user