Sign in to follow this  
Followers 0
doodn

Run Or Runwait Syntax

4 posts in this topic

I'm having a hard time understanding syntax on Run or Runwait when using macros or my_variables and would appreciate any guidance or suggestions. I'm sure it has to do with quotes/double quotes, etc. All I want to do is run progressbar.exe (thanks AutoiIt forum!) with source and destination as: D:\Bin\Progressbar.exe "D:\" "%Temp%\abc.tmp". It runs fine from Start | Run, but I cannot seem to get the syntax correct to run it from my script.

$cdr = StringMid(@ScriptDir, 1, 3)

Run($cdr & ' "Bin\progressbar.exe" "$cdr" @TempDir & '\' & "abc.tmp" ', "", @SW_MAXIMIZE)

Share this post


Link to post
Share on other sites



Run('"' & $cdr & 'Bin\progressbar.exe" "' & $cdr & '" "' & @TempDir & '\abc.tmp" ', "", @SW_MAXIMIZE)

Okay, that works like a million dollars :)

I'm studying what you've done, but it still baffles me. How might one go about learning the rules for the quotes and concatenations? The simple stuff is evident (to me), but this is far more complex (again, to me)... I'll study your code more...

Thank you JdeB!

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Okay, that works like a million dollars :)

I'm studying what you've done, but it still baffles me. How might one go about learning the rules for the quotes and concatenations? The simple stuff is evident (to me), but this is far more complex (again, to me)... I'll study your code more...

Thank you JdeB!

I use SciTE which helps me to see that the syntax is correct.

as far as the logic is concerned ... its not that difficult:

'this is a string'
"this is a string"
"'this is a single quoted string'"
'"this is a double quoted string"'
'this is a string containing 1 " double quote '
"this is a string containing 1 "" double quote "

Etc ... see the help file for some more details on this...

Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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