Jump to content

Recommended Posts

Posted (edited)

I want to run a python script from autoit. 

I know we can do this with shellexecute or run , but this python script takes 3 cmd line arguments.

How to pass them from autoit script?

I tried many ways.

Following solution also not working 

e.g. 

RunWait( 'fullpath\Python.exe Scriptpath\ReadLog.py  -f "file.log" -k "key" -e "errMsg" ')

Found solution:

RunWait( 'fullpath\Python.exe ReadLog.py  -f "file.log" -k "key" -e "errMsg" ', 'Working_directory_path')

 

PFB description:

https://stackoverflow.com/questions/45757834/how-to-pass-command-line-arguments-to-a-python-script-anyscript-while-executin

 

Edited by breakbadsp
Posted (edited)

Worked after adding the working directory optional parameter

RunWait( 'fullpath\Python.exe ReadLog.py  -f "file.log" -k "key" -e "errMsg" ', 'Working_directory_path')

 

Edited by breakbadsp

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...