computer-use-ootb-internal 0.0.184__py3-none-any.whl → 0.0.185__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -79,13 +79,17 @@ def run_preparation(state):
79
79
  # Check if template exists and construct command accordingly
80
80
  if template_file.exists():
81
81
  log.info(f"Template file found. Attempting to open {template_file} with Excel maximized...")
82
- cmd = ['cmd', '/c', 'start', '/max', 'excel', str(template_file)]
82
+ cmd_args = ['EXCEL.EXE', str(template_file)]
83
83
  else:
84
84
  log.info(f"Template file not found. Attempting to launch Excel maximized...")
85
- cmd = ['cmd', '/c', 'start', '/max', 'excel']
85
+ cmd_args = ['EXCEL.EXE']
86
86
 
87
- log.info(f"Executing command: {' '.join(cmd)}")
88
- result = subprocess.run(cmd, check=False, capture_output=True, text=True, creationflags=subprocess.CREATE_NO_WINDOW) # Add CREATE_NO_WINDOW
87
+ log.info(f"Executing command: {' '.join(cmd_args)}")
88
+ # Use Popen for more direct execution, don't wait for it
89
+ process = subprocess.Popen(cmd_args, creationflags=subprocess.DETACHED_PROCESS | subprocess.CREATE_NEW_PROCESS_GROUP)
90
+ log.info(f"Launched Excel process with PID: {process.pid}")
91
+ # Simulate success as Popen doesn't give immediate exit code
92
+ result = type('obj', (object,), {'returncode' : 0, 'stderr': '', 'stdout': ''})()
89
93
 
90
94
  if result.returncode == 0:
91
95
  log.info(f"Successfully executed command for Excel.")
@@ -81,14 +81,18 @@ def run_preparation(state):
81
81
  # Check if template exists and construct command accordingly
82
82
  if template_file.exists():
83
83
  log.info(f"Template file found. Attempting to open {template_file} with PowerPoint maximized...")
84
- cmd = ['cmd', '/c', 'start', '/max', 'powerpnt', str(template_file)]
84
+ cmd_args = ['POWERPNT.EXE', str(template_file)]
85
85
  else:
86
86
  log.info(f"Template file not found. Attempting to launch PowerPoint maximized...")
87
- cmd = ['cmd', '/c', 'start', '/max', 'powerpnt']
87
+ cmd_args = ['POWERPNT.EXE']
88
+
89
+ log.info(f"Executing command: {' '.join(cmd_args)}")
90
+ # Use Popen for more direct execution, don't wait for it
91
+ process = subprocess.Popen(cmd_args, creationflags=subprocess.DETACHED_PROCESS | subprocess.CREATE_NEW_PROCESS_GROUP)
92
+ log.info(f"Launched PowerPoint process with PID: {process.pid}")
93
+ # Simulate success as Popen doesn't give immediate exit code
94
+ result = type('obj', (object,), {'returncode' : 0, 'stderr': '', 'stdout': ''})()
88
95
 
89
- log.info(f"Executing command: {' '.join(cmd)}")
90
- result = subprocess.run(cmd, check=False, capture_output=True, text=True, creationflags=subprocess.CREATE_NO_WINDOW) # Add CREATE_NO_WINDOW
91
-
92
96
  if result.returncode == 0:
93
97
  log.info(f"Successfully executed command for PowerPoint.")
94
98
  else:
@@ -80,11 +80,14 @@ def run_preparation(state):
80
80
  # Check if template exists and construct command accordingly
81
81
  if template_file.exists():
82
82
  log.info(f"Template file found. Attempting to open {template_file} with Premiere Pro maximized...")
83
- # Keep quotes around app name if it contains spaces
84
- cmd = ['cmd', '/c', 'start', '/max', '"Adobe Premiere Pro 2024"', str(template_file)]
83
+ # Use full path for the executable
84
+ pr_executable = r"C:\Program Files\Adobe\Adobe Premiere Pro 2024\Adobe Premiere Pro.exe"
85
+ cmd = ['cmd', '/c', 'start', '/max', '""', pr_executable, str(template_file)] # Use empty title "" for start
85
86
  else:
86
87
  log.info(f"Template file not found. Attempting to launch Premiere Pro maximized...")
87
- cmd = ['cmd', '/c', 'start', '/max', '"Adobe Premiere Pro 2024"']
88
+ # Use full path for the executable
89
+ pr_executable = r"C:\Program Files\Adobe\Adobe Premiere Pro 2024\Adobe Premiere Pro.exe"
90
+ cmd = ['cmd', '/c', 'start', '/max', '""', pr_executable]
88
91
 
89
92
  log.info(f"Executing command: {' '.join(cmd)}")
90
93
  result = subprocess.run(cmd, check=False, capture_output=True, text=True, creationflags=subprocess.CREATE_NO_WINDOW) # Add CREATE_NO_WINDOW
@@ -79,14 +79,18 @@ def run_preparation(state):
79
79
  # Check if template exists and construct command accordingly
80
80
  if template_file.exists():
81
81
  log.info(f"Template file found. Attempting to open {template_file} with Word maximized...")
82
- cmd = ['cmd', '/c', 'start', '/max', 'winword', str(template_file)]
82
+ cmd_args = ['WINWORD.EXE', str(template_file)]
83
83
  else:
84
84
  log.info(f"Template file not found. Attempting to launch Word maximized...")
85
- cmd = ['cmd', '/c', 'start', '/max', 'winword']
85
+ cmd_args = ['WINWORD.EXE']
86
+
87
+ log.info(f"Executing command: {' '.join(cmd_args)}")
88
+ # Use Popen for more direct execution, don't wait for it
89
+ process = subprocess.Popen(cmd_args, creationflags=subprocess.DETACHED_PROCESS | subprocess.CREATE_NEW_PROCESS_GROUP)
90
+ log.info(f"Launched Word process with PID: {process.pid}")
91
+ # Simulate success as Popen doesn't give immediate exit code
92
+ result = type('obj', (object,), {'returncode' : 0, 'stderr': '', 'stdout': ''})()
86
93
 
87
- log.info(f"Executing command: {' '.join(cmd)}")
88
- result = subprocess.run(cmd, check=False, capture_output=True, text=True, creationflags=subprocess.CREATE_NO_WINDOW) # Add CREATE_NO_WINDOW
89
-
90
94
  if result.returncode == 0:
91
95
  log.info(f"Successfully executed command for Word.")
92
96
  else:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: computer-use-ootb-internal
3
- Version: 0.0.184
3
+ Version: 0.0.185
4
4
  Summary: Computer Use OOTB
5
5
  Author-email: Siyuan Hu <siyuan.hu.sg@gmail.com>
6
6
  Requires-Python: >=3.11
@@ -34,12 +34,12 @@ computer_use_ootb_internal/computer_use_demo/tools/edit.py,sha256=b0PwUitxckHCQq
34
34
  computer_use_ootb_internal/computer_use_demo/tools/run.py,sha256=xhXdnBK1di9muaO44CEirL9hpGy3NmKbjfMpyeVmn8Y,1595
35
35
  computer_use_ootb_internal/computer_use_demo/tools/screen_capture.py,sha256=L8qfvtUkPPQGt92N-2Zfw5ZTDBzLsDps39uMnX3_uSA,6857
36
36
  computer_use_ootb_internal/preparation/__init__.py,sha256=AgtGHcBpiTkxJjF0xwcs3yyQ6SyUvhL3G0vD2XO-zJw,63
37
- computer_use_ootb_internal/preparation/excel_prepare.py,sha256=TExvi8NWAxPf--lWPrs7-26A3pu2pUeTu2mZDzslAKI,4713
38
- computer_use_ootb_internal/preparation/powerpoint_prepare.py,sha256=WgYyKnBUavazJ7GViUK8DB9cp7RBXUujkVCJ-82HW4o,4962
39
- computer_use_ootb_internal/preparation/pr_prepare.py,sha256=F03g75Ym27_azyjMhAcQXW-qbuVePa4HE6RNFXvPtEM,5139
37
+ computer_use_ootb_internal/preparation/excel_prepare.py,sha256=mcuD9WpbC8-SL3d3J1eBkQCpnTuQy1QeuT3_zJXL8QY,4962
38
+ computer_use_ootb_internal/preparation/powerpoint_prepare.py,sha256=uesSSbC5r57UYbduxgnGBorZg2Tj82ovXgmFWdBBjZs,5204
39
+ computer_use_ootb_internal/preparation/pr_prepare.py,sha256=atFiPolCNPgvO-bhv-frdGlZXowcdSiVULQ33HqOuKc,5398
40
40
  computer_use_ootb_internal/preparation/star_rail_prepare.py,sha256=r0b19M_c1sXkN3_MRFjql8w_ThC9nZUe8zbSLYUvKS8,4635
41
- computer_use_ootb_internal/preparation/word_prepare.py,sha256=i6sFWKMpL6qOMhksZ5eHrsDvBCqcZFazKbE9LdGQxiA,4720
42
- computer_use_ootb_internal-0.0.184.dist-info/METADATA,sha256=_x9hXXwmu9fZ07S_sMc3gXmh7ZzvIvolApSQfizMrTU,1048
43
- computer_use_ootb_internal-0.0.184.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
44
- computer_use_ootb_internal-0.0.184.dist-info/entry_points.txt,sha256=bXfyAU_qq-G1EiEgAQEioXvgEdRCFxaTooqdDD9Y4OA,258
45
- computer_use_ootb_internal-0.0.184.dist-info/RECORD,,
41
+ computer_use_ootb_internal/preparation/word_prepare.py,sha256=PWOIbL69GGb7qbKfmjhAs7C_QJx0yL4qsZOraVzpfS8,4956
42
+ computer_use_ootb_internal-0.0.185.dist-info/METADATA,sha256=hwkzg5b-QBiwzUptyW0R3UvJgd7Rx7yMOnsqQujKqkg,1048
43
+ computer_use_ootb_internal-0.0.185.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
44
+ computer_use_ootb_internal-0.0.185.dist-info/entry_points.txt,sha256=bXfyAU_qq-G1EiEgAQEioXvgEdRCFxaTooqdDD9Y4OA,258
45
+ computer_use_ootb_internal-0.0.185.dist-info/RECORD,,