The 'image.find' command of Images Addon is not working properly

自闭症网瘾萝莉.ら 提交于 2019-12-25 18:04:24

问题


I am using this code which is supposed to download and open an image on my screen and then the G1ant software is supposed to search if the image popped up on my screen or not. Problem is the image did pop up but the program outputs 'The image was not found in the search area'. How can I fix this?

My code is-

♥image = ♥environment⟦USERPROFILE⟧\Desktop\image.png

file.download https://jeremykun.files.wordpress.com/2012/01/img49.png filename ♥image

program ♥image

image.find ♥image result ♥point relative false

dialog ♥point

回答1:


Did you wait for the program that is responsible to open your image to load and display the image? Use wait true argument of program command and do not use the image name as the application to run, rather do something similar to this:

♥imagePath = ‴♥environment⟦USERPROFILE⟧\Documents\some image.png‴

program ‴C:\Program Files\paint.net\paintdotnet.exe‴ arguments "♥imagePath" wait true

image.find ♥imagePath result ♥point relative false

dialog ♥point

Also, isn't your image opened scaled?



来源:https://stackoverflow.com/questions/57908266/the-image-find-command-of-images-addon-is-not-working-properly

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!