Jump to content

How to pass command line arguments to a program(Python) from RunWait


Recommended Posts

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
Link to comment
Share on other sites

  • Developers

Try something like this:

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

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

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
 Share

×
×
  • Create New...