OptimusJH Posted November 9, 2014 Share Posted November 9, 2014 #include <MsgBoxConstants.au3> #include <WindowsConstants.au3> #include <ImageSearch.au3> Global $x = 0 Global $y = 0 Func Room() Local $Room = _ImageSearcharea("room.bmp",1,708,56,768,96, $x, $y, 20) If $Room = 1 Then Call ("Room2") Else Sleep(300) Send("{ENTER}") Sleep(300) Call ("Room") Endif Endfunc Func Room2 Local $Room2 = _ImageSearcharea("room2.bmp",1,708,56,768,96, $x, $y, 20) If $Room2 = 1 Then Call ("Room") Else Sleep(300) Send("{Ctrl}") Sleep(300) Call ("Room2") Endif Endfunc ---------------------------------------------- This is my imagesearch script. But If I run program about 1 hours, It notice recursion level error. Please Help Me.. Link to comment Share on other sites More sharing options...
water Posted November 9, 2014 Share Posted November 9, 2014 Welcome to AutoIt and the forum! Can you please tell us which program you try to automate? Most of the time there are more reliable and efficient ways to automate a program than using ImageSearch. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
OptimusJH Posted November 9, 2014 Author Share Posted November 9, 2014 I make code for game which my friend made... Original Code is too Long. so I wrote part of code. Link to comment Share on other sites More sharing options...
Developers Jos Posted November 9, 2014 Developers Share Posted November 9, 2014 I make code for game which my friend made... Original Code is too Long. so I wrote part of code. Please read our forum rules before continuing posting questions in our forums. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Recommended Posts