Пример #1
0
from  pywinauto import Application
app=Application().start(r"c:\windows\system32\notepad.exe")
dlg=Application().connect(path=r"c:\windows\system32\notepad.exe")
dlg=app.window()
dlg.print_control_identifiers()
dlg.menu_select("File->save as")

this_one=app.window(title="Save As")
this_one.Edit1.set_edit_text("Sample")
this_one.save.click()



Пример #2
0
        render_path = os.path.join(render_que, file_stripped)
        if (os.path.exists(render_path)):
            export_path = render_path + '\\'
            print('Directory Exists: %s' % (export_path))
            sucessful_export += 1
            print('Export Successful: File: %s of %s \n----------\n\n' % (sucessful_export, file_count))
            continue

        else:
            os.mkdir(render_path)
            export_path = render_path + '\\'
            print('Created Directory: %s' % (export_path))
        
            
        #NEW PROJECT
            app.menu_select('File->New')

            if (app.child_window(title="Save changes to Untitled Project.svpj before closing?").exists()):
                print('A pesky window appears... KILL')
                app.NoButton.click()
            
        #OPEN FILE    
            app.menu_select('File->Open')

            if (app.child_window(title="Save changes to Untitled Project.svpj before closing?").exists()):
                print('A pesky window appears... KILL')
                app.NoButton.click()
            app.OpenDialog.FileNameEdit.type_keys('%s' % (file))
            app.OpenDialog.Open3.click_input()
            app.child_window(title="Import Settings").wait('enabled', timeout=120)
            if (app.child_window(title="Import Settings").is_visible()):