sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #54520
[Question #689267]: Capturing value automatically from a Terminal window
New question #689267 on Sikuli:
https://answers.launchpad.net/sikuli/+question/689267
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\SikuliXVer2.1.0-SNAPSHOT"
noFile = os.path.join(dir, "Number.txt")
f = open(noFile)
for line in f.readlines():
id = line.strip()
print id
noList.append(id)
#print(noList)
f.close()
App.open(r'CMD /k start "Sample screen" "E:\Pritam\SikuliXVer2.1.0-SNAPSHOT\SikuliX.sikuli\Sum_two_simulation.bat" ')
for id in noList:
type("" + id + Key.ENTER)
wait(3)
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.