KDoc Posted November 14, 2020 Posted November 14, 2020 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 Jos Posted November 14, 2020 Developers Posted November 14, 2020 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.
Nine Posted November 14, 2020 Posted November 14, 2020 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 ? “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now