BussinessLogic.py 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. from conf import PathConfig
  2. from pywinauto.application import Application
  3. import time
  4. import os
  5. class business_logic:
  6. def convert_files(self,file):
  7. Path = PathConfig( )
  8. #app = application.Application()
  9. backslash = "\\"
  10. FolderPaths = Path.getPath()
  11. print(FolderPaths[1])
  12. print(file)
  13. app_path = FolderPaths[1]+backslash+file
  14. print(app_path)
  15. #os.startfile(app_path)
  16. #time.sleep(100)
  17. print("Sleep End!!!")
  18. app = Application().connect(path=r"C:\Program Files\TechSmith\Camtasia 9\CamtasiaStudio.exe")
  19. #app = Application().Connect(title=u'Camtasia 9', class_name='HwndWrapper[CamtasiaStudio.exe;;29b38be4-d942-44c3-a8ec-2ba5eff5a55f]')
  20. hwndwrappercamtasiastudioexebbedcaecbaeffaf = app[u'Camtasia 9']
  21. #hwndwrappercamtasiastudioexebbedcaecbaeffaf.ClickInput(coords=(200, 15))
  22. #hwndwrappercamtasiastudioexebbedcaecbaeffaf.TypeKeys("{DOWN}")
  23. #hwndwrappercamtasiastudioexebbedcaecbaeffaf.TypeKeys("{ENTER}")
  24. #time.sleep(5)
  25. print("Sleep End!!!")
  26. app.Window_(best_match='Dialog', top_level_only=True).ChildWindow(best_match='Finish').Click()
  27. #app.Window_(best_match='Dialog', top_level_only=True).ChildWindow(best_match='Next').Click()
  28. #app = Application().connect(path=r"C:\Program Files\TechSmith\Camtasia 9\CamtasiaStudio.exe")
  29. #hwndwrappercamtasiastudioexebcfebfcbbefbad = app[u'Camtasia 9']
  30. #hwndwrappercamtasiastudioexebcfebfcbbefbad.Minimize()
  31. #app.Window_(title='Camtasia 9').MenuSelect('File')
  32. #app.CamtasiaStudio.draw_outline()
  33. #app['Camtasia 9'].menu_select("Share")
  34. #xyz = app.CamtasiaStudio.Menu_select("Help->About Camtasia")
  35. #app.Share.print_control_identifiers()
  36. #app.PopupMenu.Menu().get_menu_path("Cancel")[0].click()
  37. #app.Window_(best_match='Dialog', top_level_only=True).ChildWindow(best_match='Cancel').Click()
  38. #os.startfile(app_path)
  39. #autoit.run("E:\sample\TK Praktikum1.trec")
  40. #autoit.win_wait_active("[CLASS:Notepad]", 3)
  41. #autoit.control_send("[CLASS:Notepad]", "Edit1", "hello world{!}")
  42. #autoit.win_close("[CLASS:Notepad]")
  43. #autoit.control_click("[Class:#32770]", "Button2")