← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #242258]: visual calculator button need help

 

Question #242258 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/242258

Description changed to:
hello,

I'm trying to simulate a calculator by adding a bunch of numbers from a
file.

I have a myfile.txt containing some values, example:
price        quantity
1.99         2
3.49         20
0.99         15

I'd like to open the calculator from Windows.  So the keypads are there.

I'd capture the screen of each button.
img0 = button_number_0
img1 = button_number_1
...
img9 = button_number_1
etc...

I defined a multidimensional array
keys = [[img0][0],...,[img9[[9]]

now say I read the myfile.txt and multiply the price * quanity in each
row, and I also want to see the mouse is clicking on corresponding key
of the calculator.

How would I go about doing that?

I checked http://groups.csail.mit.edu/uid/projects/sikuli/sikuli-
uist2009.pdf under Visual Dictionary but when I did this, it gave me
'dict' is not callable.

VisualDict = {}
my_keys = VisualDict({img0:"0",img1:"1",.....img9:"9"})
click(my_keys[img0])    

gave error
TypeError: 'dict' object is not callable

Thank you!

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.