Jump to content
Sign in to follow this  

Passing flags to a command in RunWait

Recommended Posts

I can't get the flags to pass properly. My python script has run for a year or so, so I know it's fine. I did some stuff with autoit that just isn't possible with what i know of python (run an app and pass some mouse clicks to it).

I checked my variables and they get set OK, and myscript.py starts, but doesn't run. So I think that it's failing on the two variables that I'm passing.

In python I'm using:

myString = sys.argv[1]

mySecondString = sys.argv[2]

to grab the two flags. Nope, no error checking :). It's just me who runs the scripts and I'm too lazy to error check. :lol:

Any help is greatly appreciated.

$share = "Z"
$finaldir = '2004.01.31'

;RunWait(@ComSpec & " /c " & '"C:\Program Files\Path to stuff\myscript.py"' & " " & $share & " " & $finaldir, "", @SW_HIDE)
; run python command and pass two flags to the program



Did I say something about I know the python script is fine? There's a little issue of adding the good old + sign when you send a variable and then some quoted text. And I forgot the +. :huh2:

doc = word.Documents.Open(myString + ':\\DocPath\\Here\\mydoc.doc')

works much better than

doc = word.Documents.Open(myString, ':\\DocPath\\Here\\mydoc.doc').

Sorry for the clutter... I should have tried harder to find it before posting.

Edited by randd

Raoul S. Duke: Few people understand the psychology of dealing with a highway traffic cop. Your normal speeder will panic and immediately pull over to the side. This is wrong. It arouses contempt in the cop-heart. Make the bastard chase you. He will follow.

Share this post

Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...