← Back to team overview

sikuli-driver team mailing list archive

[Question #295982]: How to click on a location which has a "text" on it defined in a variable

 

New question #295982 on Sikuli:
https://answers.launchpad.net/sikuli/+question/295982

Hi all,

I want to make a Sikuli script to click to a location on the screen where there is a "text" string defined in a variable.
 Eg:  text = "text_location"
         click(text)

When I run that, Sikuli complains that no image "text_location.png" found
I see in the documentation of click() function and see that it accepts string as the pattern to search
         click(PSMRL[, modifiers])
                  Perform a mouse click on the click point using the left button.
                  Parameters:	
                           PSMRL – a pattern, a string, a match, a region or a location that evaluates to a click point.
                           modifiers – one or more key modifiers

Why does it still require image file here?

Please help to accomplish this task.

Thanks
Huy 
  

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.