0

I have the following script:

For $alpha = 1 to 10
 For $beta = 1 to 10
  Run('"C:\Users\MyProg.exe ' & alpha/10 & ' ' & beta/10 & ' 200 2 0.5'
  ;some other actions follow
 Next
Next

I have checked many times that the string is well-formed, thus I have no idea why the script wouldn't run the program. Could you help me please?

2
  • 4
    Missing a closing " and ) for a start? Commented Nov 6, 2015 at 7:07
  • Have you tried assign your run statement in the loops to a variable first and just controlled via ConsoleWrite(...) whether the statements are all concatenated properly and can be run each on its own on a command line? Commented Nov 6, 2015 at 14:10

1 Answer 1

1

Just replace the ending ' with "') and use proper variable names including the $... like $alpha instead of just alpha. Your syntax check in SciTE should have told you.

For $alpha = 1 to 10
    For $beta = 1 to 10
        Run('"C:\Users\MyProg.exe ' & $alpha/10 & ' ' & $beta/10 & ' 200 2 0.5"')
        ;some other actions follow
    Next
Next
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.