|
Post by fundulopanchax on Nov 13, 2020 14:37:27 GMT
hi guys, just bought the lifetime pro version and am loving it. I would like to know if there is a way to close an app and exit the if(true) do loop if it recognises a specific image (run out of stamina page). Here is my loop while (true) do if exists("useitemLD.jpg") then click(Location(558, 872)) wait(2) --click start existsClick("startLD.jpg", 2) existsClick("startLD.jpg", 2) end if exists("close.jpg") then click(Location(899, 1859)) existsClick("summonnightmare.jpg", 1) existsClick("summonnightmare_lowres.jpg", 1) existsClick("summonnightmare_highres.jpg", 1) end if exists("expearnedLD.jpg", 1) then wait(1) setContinueClickTiming(10,50) continueClick(541,1977,1,1,14) end if exists("connectionfailed.jpg") then existsClick("ok.jpg", 1) end existsClick("update.jpg", 1) <recognise "no more ap" and close app + end loop>
end would be cool if i could get some advice, thanks
|
|
|
Post by Exilereven on Nov 13, 2020 18:52:33 GMT
killApp(): ankulua.boards.net/thread/13/advanced-methods#killAppFor closing your app. And you will be using a "break" in your code to leave the infinite while loop, example: while true do if exists("image.png") then break --to leave loop end end Side note: I recommend saving your images as .png, you will eventually run into issues using .jpg.
|
|
|
Post by fundulopanchax on Nov 18, 2020 6:43:05 GMT
killApp(): ankulua.boards.net/thread/13/advanced-methods#killAppFor closing your app. And you will be using a "break" in your code to leave the infinite while loop, example: while true do if exists("image.png") then break --to leave loop end end Side note: I recommend saving your images as .png, you will eventually run into issues using .jpg. hey man, thanks for the tips, i managed to get the break loop working, but not killApp(). Found a work around though, using keyevent() to press the home screen button. regarding the file extension, what kind of issues are they?
|
|
|
Post by Exilereven on Nov 18, 2020 11:41:50 GMT
|
|