Good day,
I need help regarding about my AHKProject, I have a game that is running 1024x768 windows mode, what want to do is:
1. If the AHKProject detect/see/find a word "Keep Going" automatically send {Enter}
2. If the AHKProject detect/see/find "map1 123,456" "map2 12,34" "map3 123, 45" "map4 12,345" it will become:
for map1 a:=123 b:=456
for map2 a:=12 b:=34
for map3 a:=123 b:=45
for map4 a:=12 b:=345
Is there anyway I can do this? or is there any application or logical solution for this?
Thank you
Need help for my AHK Project
Re: Need help for my AHK Project
You could have a look at ControlGetText and ControlSetText. Window Spy can show you the control names.
Re: Need help for my AHK Project
I already solve the problem 1 which I use the findtext function.mikeyww wrote: ↑18 Jun 2021, 06:14You could have a look at ControlGetText and ControlSetText. Window Spy can show you the control names.
the only problem left is problem 2.
Re: Need help for my AHK Project
Code: Select all
ttext =
For k, v in ["map1 123,456", "map2 12,34", "map3 123, 45", "map4 12,345"]
arr := map(v), a := arr.1, b := arr.2, ttext .= "`na := " a ", b := " b
MsgBox, 64, Results, % SubStr(ttext, 2)
map(str) {
RegExMatch(str, "(\d+), *?(\d+)", m)
Return [m1, m2]
}
Re: Need help for my AHK Project
I think I need to use OCR function. Do you have OCR function?mikeyww wrote: ↑18 Jun 2021, 09:13Code: Select all
ttext = For k, v in ["map1 123,456", "map2 12,34", "map3 123, 45", "map4 12,345"] arr := map(v), a := arr.1, b := arr.2, ttext .= "`na := " a ", b := " b MsgBox, 64, Results, % SubStr(ttext, 2) map(str) { RegExMatch(str, "(\d+), *?(\d+)", m) Return [m1, m2] }
Re: Need help for my AHK Project
If you search the forum for OCR, you will find a few different flavors. One is below.
https://www.autohotkey.com/boards/viewtopic.php?t=36047
https://www.autohotkey.com/boards/viewtopic.php?t=36047
Who is online
Users browsing this forum: iamMG and 115 guests