Capturing value automatically from a Terminal window
Hi,
I want to perform below steps to fulfill my POC on simulation of an existing process-
1. Create a script that adds and multiplies two numbers
Output – sum: <#>, product: <#>
2. Specify a set of input number pairs in a file
3. Sikuli reads the file and runs the script with those inputs
4. Sikuli reads result off the screen(Sum & Product) and writes in a output file.
Upto step 3 i've covered, now i'm not able to figure out how i can perform step 4. Any idea will be helpful. My bat produces output like-
echo Sum is: %Sum%
echo Multiplication is: %Multiplication%
Below is what i've done after taking reference from this forum-
import os
noList = []
dir = "E:\Pritam\
noFile = os.path.join(dir, "Number.txt")
f = open(noFile)
for line in f.readlines():
id = line.strip()
print id
noList.
#print(noList)
f.close()
App.open(r'CMD /k start "Sample screen" "E:\Pritam\
for id in noList:
type("" + id + Key.ENTER)
wait(3)
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Pritam Biswas for more information if necessary.