sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #32913
Re: [Question #268016]: array of numeric values
Question #268016 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/268016
Status: Open => Answered
RaiMan proposed the following answer:
values = [] # empty list
while True: # collection loop
# click and select next value on page
type("c", Key.CTRL) # copy to clipboard
sVal = App.getClipboard() # get the string
try:
nVal = int(sVal)
catch:
print "not numeric", sVal
nVal = -1 # some impossible value
if not nVal == -1: # valid
nVal1 = nVal # calculate what is needed
values.append([nVal, nVal1])
print values
now you have your number pairs as 2-item-lists in this values list.
to store:
for val in values:
nVal, nVal1 = val # get the 2 values separately
# now do what is needed
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.