Jump to content

Recommended Posts

Posted

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)
Posted

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!

  • Developers
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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...