Last active
April 3, 2021 20:05
-
-
Save fnx4/fa0cbb79a495c6894a402417c078befe to your computer and use it in GitHub Desktop.
ocr to prmt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;CoordMode Mouse, Screen | |
| tgtMonitor = 2 | |
| Search("p3.png", tgtMonitor) | |
| Search(srcImg, tgtMonitor) { | |
| SysGet, Mon, Monitor, %tgtMonitor% | |
| ImageSearch, xi, yi, %MonLeft%, %MonTop%, %MonRight%, %MonBottom%, %A_WorkingDir%\%srcImg% | |
| if (ErrorLevel = 2) { | |
| MsgBox Could not conduct the search | |
| } else if (ErrorLevel = 1) { | |
| if (srcImg == "p3.png") { | |
| Search("p2.png", tgtMonitor) | |
| } else if (srcImg == "p2.png") { | |
| Search("p1.png", tgtMonitor) | |
| } else if (srcImg == "p1.png") { | |
| MsgBox Not found | |
| } | |
| } else { | |
| ;MsgBox Icon %srcImg%: %xi%x%yi% | |
| Click %xi%, %yi%, 0 | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment