VDict() error when trying to do a find/comparison
In an effort to circumvent to inability to paste a value to a variable, I am trying to use the VDict() function to find the image, and complare it against 8 known images.
Essentially i do a "Get Info" on a file, look for the Dimensions area, and try to compare it to my internal dictionary.
size = VDict()
size[<img>] = "88x31"
size[<img>] = "97x61"
size[<img>] = "120x30"
size[<img>] = "120x60"
size[<img>] = "120x90"
size[<img>] = "300x100"
size[<img>] = "300x250"
size[<img>] = "680x180"
switchApp(
click(<img>)
type(file)
type("i", KEY_CMD)
img = find(<img>)
result = size[img]
It pops back errors in the "__getitem__"
I followed the example basically swapping out a "find" for the "capture" I don't understand all of the the documentation for VDict()... can somoen help out?
[sikuli] [Error] source lineNo: 16
[sikuli] [Error] Traceback (innermost last):
File "/var/folders/
File "/Users/
File "/Users/
File "/Users/
AttributeError: __getitem__
Question information
- Language:
- English Edit question
- Status:
- Expired
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply: