is there any way to use the dynamic values in Silkuli

Asked by Muzammil Basha

Is there any option in sikuli that the values that are observed on the screen while running the script can be copied or collected and later that can be used.

i.e Ex: Consider that a there is a button which has a value and the value gets updated on every refresh. Once the value is displayed over the button it remains constant at different screens until refresh. further on refresh the new value gets updated on every location of this button.

So I want to capture that value and compare it with the other locations where ever it is displayed. Hence on every refresh I should run this script which eventually captures the new value and compares this in the other locations.

i.e say 1234, is the value displayed over the button on refresh. Hence this value gets updated on different location, say at 3 other locations. So on observing for the first time I need to capture that value and then use this captured to compare its presence at different location where ever this button available. i.e other 3 locations.

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

-- 1. you might use onChange()/observe() to trigger a workflow, if some area on the screen changes (even some of them in parallel in the background)

-- 2. you might use Region.text(), to "read" the textual content of an area, if the used font is a "rather normal" font
(see bug 710586)

Revision history for this message
Muzammil Basha (ksmuzzu) said :
#2

Hey, RaiMan, thanku for ur response, but not working exactly, because the fonts which its capturing differs every time.

Revision history for this message
Best RaiMan (raimund-hocke) said :
#3

So only solution 1 can be used (since I guess, thet Region.text() cannot read you fonts correctly).

To get more help/hints, you have to be more specific.
Feel free to send me screenshots to my mail at https://launchpad.net/~raimund-hocke

Revision history for this message
Muzammil Basha (ksmuzzu) said :
#4

Thanks RaiMan, that solved my question.