Sign in to follow this  
Followers 0
rossnixon

runwait with lots of parameters

4 posts in this topic

Hi all, I've looked at other messages about this, honest... but how do I debug runwait?

I have executed my program OK in a batch file, but as it requires a couple of variables, I want runwait to do this.

In the batch file it looks like this (made it look generic for ease of reading):

"full_program_path" option1 option2 option3 "full_input_path" "output_filename" option4 option5 option6 option7 "input_filename"

Note: all the double quotes are expected by my program.

I used FileGetShortName to get "full_program_path" into $myProg

and have got "full_input_path into $thePath

I'm unsure about use of the ampersand and single quotes in this:

RunWait(@ComSpec & ' /c ' & $myProg 'option1 option2 & $thePath "output_filename" option4 option5 option6 option7 "input_filename"')

Can anyone spot incorrect use of & ' " or space characters?

Or is there a way to spot error messages before runwait closes? Thanks.

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

Can anyone spot incorrect use of & ' " or space characters?

Or is there a way to spot error messages before runwait closes? Thanks.

The highlighting in a editor picks up errors like Scite4AutoIt3.

RunWait(@ComSpec & ' /c "' & $myProg & '" option1 option2 "' & $thePath & '" "output_filename" option4 option5 option6 option7 "input_filename"')

Use /k switch instead of /c to keep window open for debugging purposes.

:)

Edited by MHz

Share this post


Link to post
Share on other sites

The highlighting in a editor picks up errors like Scite4AutoIt3.

(snip answer)

Use /k switch instead of /c to keep window open for debugging purposes.

Thanks, with your example and a little tweaking I got it working, thanks.

I like EDXOR as an editor, but will try Scite4AutoIt3 if I get similar problems next time.

I hereby recommend that MHz be promoted to GHz for his valuable help to newbies!

:)

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  
Followers 0