randd 0 Posted June 15, 2004 (edited) 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. 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 EDIT: 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 +. 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 June 15, 2004 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