我有一个VB.net项目可执行文件。我使用Sikulix IDE启动可执行文件。
#Click application logo to start
doubleClick("1459230114375.png")
#Login screen Enter UserName,Password,click ok
type("1459230089151.png","admin")
type("1459230150826.png","")
click("1459229716030.png")
运行代码时出现此错误消息:
[error] RobotDesktop: checkMousePosition: should be L(113,545)@S(0)[0,0 1280x768] but after move is L(706,63)@S(0)[0,0 1280x768] Possible cause in case you did not touch the mouse while script was running: Mouse actions are blocked generally or by the frontmost application. You might try to run the SikuliX stuff as admin.
[error] RobotDesktop: checkMousePosition: should be L(575,376)@S(0)[0,0 1280x768] but after move is L(600,353)@S(0)[0,0 1280x768] Possible cause in case you did not touch the mouse while script was running: Mouse actions are blocked generally or by the frontmost application. You might try to run the SikuliX stuff as admin.
[error] RobotDesktop: checkMousePosition: should be L(715,402)@S(0)[0,0 1280x768] but after move is L(595,350)@S(0)[0,0 1280x768] Possible cause in case you did not touch the mouse while script was running: Mouse actions are blocked generally or by the frontmost application. You might try to run the SikuliX stuff as admin.
答案 0 :(得分:1)
您应该尝试以管理员身份运行Sikuli IDE,因为错误消息中会提示您。您可以在以管理员身份启动终端时从命令行执行此操作。您可以在here找到详细信息。
答案 1 :(得分:0)
在python中,它对我来说是这样的:
import pyautogui as pg
pg.click(x = 2206, y = 353)# click somewhwere on sikuli on the screen
pg.hotkey('ctrl', 'r')
然后Sikuli可以使用鼠标