How can I wait for this lasso selection window that powerpoint spawns to disappear?

27 Views Asked by At

I'm trying to wait for this whole screen lasso selection tool to disappear.

I'm using this pywinauto code to reach it, basically start powerpoint.exe and send keys to get to that command. If I check for any controls to be visible, it won't work because Powerpoint keeps all it's controls visible.

#import pywinauto Application class
from pywinauto.application import Application
#support for env. variables
import os

#set path and arguments for powerpoint
ppt_path = r"C:\Program Files (x86)\Microsoft Office\root\Office16\POWERPNT.EXE"
ppt_args = r"/b"
ppt_startInfo = f"{ppt_path} {ppt_args}"

#set location to save file
userprofile_path = os.environ.get("userprofile")
rec_file_path = f"{userprofile_path}\Documents"

#start a new process
app = Application().start(ppt_startInfo,timeout=10)

# Access the PowerPoint window
dlg_spec = app.window(title='מצגת1 - PowerPoint')
dlg_spec.wait('enabled')
dlg_spec.type_keys('%')
dlg_spec.type_keys('פ')
dlg_spec.type_keys('זסק')

Ribbon -> Insert -> Screen Recording

I tried searching for a solution in the documentation of Powerpoint vba and used swapy and au3_spy without much success in finding that control name etc.

0

There are 0 best solutions below