|
Post by nyquister on Feb 21, 2019 10:34:53 GMT
Is there a reason why I have no problem using existsClick(image) but I am having problem using Region:existsClick(image) I tried using Region1 = Region(aaa, bbb, ccc, ddd)Region1:existsClick(image) or Region(aaa, bbb, ccc, ddd):existsClick(image) and both failed. But if i were to just use existsClick(image) I have no errors at all I am sure my region is larger than the image. I am using SnapYourScript to get my region.
|
|
|
Post by AnkuLua on Feb 21, 2019 10:52:47 GMT
The exception is from click(), not existsClick()
You could use Region1:highlight(1) to make sure that the region covers the image.
|
|
|
Post by nyquister on Feb 21, 2019 11:12:52 GMT
Problem solved, the highlight function really helped out. The image is showing another line of the same mistake. Apologize for the confusion.
Apparently my mistake was setScriptDimension is at the wrong value.
|
|
|
Post by nyquister on Feb 21, 2019 11:16:07 GMT
Is there anyway to put region, highlight and click with pattern image similiar in 1 line of code?
I get really confused whenever I have to put multiple methods in 1 line as I have no idea which comes first.
|
|
|
Post by AnkuLua on Feb 21, 2019 12:16:21 GMT
Is there anyway to put region, highlight and click with pattern image similiar in 1 line of code? I get really confused whenever I have to put multiple methods in 1 line as I have no idea which comes first. Write the script in the way you are comfortable. Putting many methods in one line may not be good.
|
|
|
Post by Exilereven on Feb 22, 2019 14:28:38 GMT
Is there anyway to put region, highlight and click with pattern image similiar in 1 line of code? I get really confused whenever I have to put multiple methods in 1 line as I have no idea which comes first. try using a variable for less confusion: Example: --make sure you set this above all your function your going to use it in example = Pattern(Region(0,0,1,1)"image.png",1):targetOffset(1,1):similar(0.8))
--then you can see what your doing when your coding later
existsClick(example) getLastMatch():highlight(3)
hopefully this helps a little, i will try and get you a better example when i get home.
|
|