Jump to content

Recommended Posts

Posted

Hi,

Is there any way to use variables for the RunWait command.   

I have the following statement.  I want the numbers after the --screen-rect to be variable.  Therefore I was trying to creating a string called $G_list where I can modify the #'s and then pass it as the variable to RunWait. However, it gives me an error. I think part of it is that the quotes in the beginning and end of G_list may be creating an issue given that the string itself has quotes in it. 

$G_list="@ComSpec & ' /c  ' & 'c:\ocr\Capture2Text_CLI.exe --screen-rect "190 130 373 153"  -o c:\emr\item1.txt'"
RunWait($G_list, @TempDir, @SW_HIDE)

Any help would be greatly appreciated. 

Thanks

 

  • Developers
Posted

Probably something like this:

$G_list=@ComSpec & ' /c  c:\ocr\Capture2Text_CLI.exe --screen-rect "190 130 373 153"  -o c:\emr\item1.txt'
RunWait($G_list, @TempDir, @SW_HIDE)

 

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.
  :)

Posted
3 hours ago, KDoc said:

I want the numbers after the --screen-rect to be variable.

Local $x1 = 190, $y1 = 130, $x2 = 373, $y2 = 153
Local $G_list = @ComSpec & ' /c  c:\ocr\Capture2Text_CLI.exe --screen-rect "' & _
  $x1 & ' ' & $y1 & ' ' & $x2 & ' ' & $y2 & '"  -o c:\emr\item1.txt'
RunWait($G_list, @TempDir, @SW_HIDE)

Is that it ?

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...