(^_^)

Recursion level has been exceeded

15 posts in this topic

#1 ·  Posted (edited)

C:\Documents and Settings\Shawn\Desktop\gui\hunter.au3 (18) : ==> Recursion level has been exceeded - AutoIt will quit to prevent stack overflow.:

what is this error? and how do i fix it?

Edited by (^_^)

[center][font="Arial Black"] DESEAN[/font][/center] [center]<<<WOW Fi$her>>>[/center][center]<<<mp3 player>>>[/center]

Share this post


Link to post
Share on other sites



)" data-cid="215264" data-date="Jul 31 2006, 06:06 PM">

C:\Documents and Settings\Shawn\Desktop\gui\hunter.au3 (18) : ==> Recursion level has been exceeded - AutoIt will quit to prevent stack overflow.:

what is this error? and how do i fix it?

That usually means you have a logical loop where a function is calling itself.

:whistle:


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

)" data-cid="215264" data-date="Aug 1 2006, 12:06 AM">

C:\Documents and Settings\Shawn\Desktop\gui\hunter.au3 (18) : ==> Recursion level has been exceeded - AutoIt will quit to prevent stack overflow.:

what is this error? and how do i fix it?

search the forum for "+recursion +exceeded" and you'll find several suggestions. Most certainly you are calling functions in a "circular way", without ever returning. That's a "default" problem of game cheating bots :-)

func1()

func func1()
func2()
; This line will never be reached.
endfunc

func func2()
func1()
; This line will never be reached.
endfunc

Re-design your code.

Cheers

Kurt

Edited by /dev/null

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

Re-design your code.

If you can ^^

There is some code i have that no one has yet been able to rescructure this way. It's possbile (but unlikely) that your existing code may be entirely unusable becuase it's design relys specifically on function recursion...

Share this post


Link to post
Share on other sites

There is some code i have that no one has yet been able to rescructure this way.

I'm sure there are people here who are able to restructure it, however I think they simply don't want to do it for you if your script is large enough. Would you do it? :whistle:

Cheers

Kurt


__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

It's not really that long of a function (32 lines)...

I might ^^

You can take alook if you want -

http://www.autoitscript.com/forum/index.php?showtopic=29193

I really don't know if it's possible. I've redone functions before do remove funciton recursion but this is a bit different becuase it requires a 'marker' point that can only be made from the function return.

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

It's not really that long of a function (32 lines)...

I might ^^

You can take alook if you want -

http://www.autoitscript.com/forum/index.php?showtopic=29193

I really don't know if it's possible. I've redone functions before do remove funciton recursion but this is a bit different becuase it requires a 'marker' point that can only be made from the function return.

O.K. the code is not very long, but it's impossible to understand what you are doing without proper documentation and without the code for the other functions like _PixelRead and _PixelWrite. Also, what's the purpose of your "check chart"? etc., etc., ...

You see: I guess it will be possible to restructure the code, but it will take a lot of time to actually understand what you are doing, before one can start to restructure your code.

EDIT: Btw. I don't know the "magic paintbrush" effect ....

Cheers

Kurt

Edited by /dev/null

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

Those are unessacry...its redo-ing the logic doesn't depend on those at all. PM me and I'll show you what i've been working on with Smoke_N.

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

Those are unessacry...its redo-ing the logic doesn't depend on those at all. PM me and I'll show you what i've been working on with Smoke_N.

They are not in the code you posted in the thread, because you use the result of _PixelRead() to decide if you let PixelBomb call itself. That could well lead to a never ending loop.

Cheers

Kurt

Edited by /dev/null

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

PixelRead simply does what it seems...reads a pixel...how it does it aren't that important...look at that link i posted though and scroll on down....you'll see the functions you and others asked for and a link to the scripts and scraps post where the whole source is avialable if you so choose. But really it's unneccary for restructuring purposees... anywho, thanks for your interest and PM me with anything else as i dont want to hijack this guys thread.

Share this post


Link to post
Share on other sites

eviltoaster, did it occur to you that maybe it is necessary to have that information to restructure the code? I'm not very inclined to believe your opinion on what is and is not needed to restructure code when you can't do it. If you were able to restructure the code, I would be inclined to believe you when you say that the implementation details of those functions are not necessary. However, if you were able to restructure the code, this conversation would not exist. Therefore, logic dictates that since you are incapable of restructuring the code, you can not judge what is and is not necessary to restructuring the code.

In short, what I'm saying is shut up and show all the code so Kurt can maybe help you or just shut up. It all depends on whether you really want help or not in solving the problem. If you do, shut up and show the code - if you don't, shut up, you're wasting Kurt's time playing the run-around game.

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

in the meantime I know what was is trying to do. He implemented a variant of the flood-fill algorithm with recursion but the code hits the max. recursion limit of AutoIT when the fill area gets too large. I recommended to use a non recursive flood-fill algorithm (the ones that use it's own stack instead).

http://student.kuleuven.be/~m0216922/CG/floodfill.html

Cheers

Kurt

Edited by /dev/null

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

#13 ·  Posted

what is this error? and how do i fix it?

HotKeySet("{ESC}", "stop")


Global $var = DriveGetSerial("c:\")

;~         $color = "0x4A224D,0x201029,0x381D34,0x1D112A,0x2F5669,0x281329,0x33262D,0x8CC00C,0xACEC0E" ;ฑูตทัพทหารตั้งโต๊ะ
        $color = "0x103257,0x082040,0x1B70AE,0x326C9B,0x214F79,0x185284" ;ทหารธนูใจ
        $mon = StringSplit($color, ",")
Global $TS5
Global $Round = 0
Global $Sum = 0
Global $pssix = 0
Global $X = 0
Global $Y = 0
Global $ButtonStart = 0

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <Date.au3>
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <ImageSearch.au3>

Opt("GUIOnEventMode", 2)
Opt("MouseCoordMode", 2)
Opt("PixelCoordMode", 2)
Opt("CaretCoordMode", 2)

Func _PSsixLoadH($gtitle)
    $TS5 = WinGetHandle($gtitle)
    If @error Then
        MsgBox(4096, "Error", "กรุณาเปิดเกม TS5 Legend ก่อนครับ")
        Exit
    EndIf
EndFunc   ;==>_PSsixLoadH

If _PSsixLoadH("TS5 Legend") Then WinActivate($TS5)
$pos = WinGetPos("TS5 Legend")

#Region ### START Koda GUI section ### Form=C:\BotTs5\Form1.kxf
$Form1 = GUICreate("BotTs5 by 9___POP V5", 301, 341, 790, 183)
GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close")
GUISetOnEvent($GUI_EVENT_MINIMIZE, "Form1Minimize")
GUISetOnEvent($GUI_EVENT_MAXIMIZE, "Form1Maximize")
GUISetOnEvent($GUI_EVENT_RESTORE, "Form1Restore")
$Pic1 = GUICtrlCreatePic("C:\BotTs5\headnews.jpg", 8, 8, 284, 100)
GUICtrlSetOnEvent(-1, "Pic1Click")
$List1 = GUICtrlCreateList("", 8, 117, 284, 110)
GUICtrlSetOnEvent(-1, "List1Click")
$Input1 = GUICtrlCreateInput("", 8, 312, 121, 21)
GUICtrlSetOnEvent(-1, "Input1Change")
$Input2 = GUICtrlCreateInput("", 8, 280, 41, 21)
GUICtrlSetOnEvent(-1, "Input2Change")
$Button1 = GUICtrlCreateButton("เริ่มใช้งาน", 8, 232, 91, 41)
GUICtrlSetOnEvent(-1, "Button1Click")
$Button2 = GUICtrlCreateButton("ปิด", 104, 232, 92, 41)
GUICtrlSetOnEvent(-1, "Button2Click")
$Button3 = GUICtrlCreateButton("ลงทะเบียน", 200, 232, 93, 41)
GUICtrlSetOnEvent(-1, "Button3Click")
$Label1 = GUICtrlCreateLabel("จำนวนรอบเข้าสู้ เมื่อครบกำหนดจะไปหลอมอุปกรณ์", 56, 284, 235, 17)
GUICtrlSetOnEvent(-1, "Label1Click")
$Label2 = GUICtrlCreateLabel("เลขลงทะเบียนผู้ทดลองใช้", 136, 315, 156, 17)
GUICtrlSetOnEvent(-1, "Label2Click")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    Sleep(100)
    Select
        Case $pssix = 1
            $pssix = 0
        Case $ButtonStart = 1
            $ButtonStart = 0
            Start()
        Case $ButtonStart = 2
            $ButtonStart = 0
    EndSelect
WEnd

Func Start()
    
    While 1
        If $ButtonStart <> 0 then ExitLoop
        WinActivate($TS5)
        If PixelGetColor(512, 385) = 0x093F3B Then ; หลุดเข้าใหม่
            MouseClick("left", 512, 385, 1, 5)
        EndIf
        If PixelGetColor(510, 514) = 0x6A4C38 Then ; กดปุ่ม รู้แล้ว
            MouseClick("left", 510, 514, 1, 5)
        EndIf
        If PixelGetColor(620, 483) = 0x439377 Then ; กดปุ่ม เข้าเกมส์
            MouseClick("left", 620, 483, 1, 5)
        EndIf
          If PixelGetColor(950, 62) = 0xFDF6DF Then ; กดปุ่มปิดโฆษณา
              MouseClick("left", 950, 62, 1, 5)
          EndIf
        Sleep(100)
        For $i = 1 To $mon[0]
            Do
                $aCoord = PixelSearch($pos[0], $pos[1], $pos[0] + $pos[2], $pos[1] + $pos[3], $mon[$i])
                If Not @error Then
                    MouseClick("", $aCoord[0], $aCoord[1])
                    Sleep(100)
                EndIf
            Until Not IsArray($aCoord)
            
        Next
        If PixelGetColor(256, 24) = 0xFCD300 Then ; คลิ๊กที่ตัวเอง
            GUICtrlSetData($List1, "[1] กำลังค้นหามอนสเตอร์")
            MouseClick("left", 515, 301,2,5)
            Sleep(1000)
        EndIf
        If PixelGetColor(997, 158) = 0xCFBB88 Then ; กดปุ่ม Auto
            MouseClick("left", 997, 158, 1, 5)
            Sleep(500)
            MouseClick("left", 999, 100, 1, 5) ; กด x1
            Sleep(500)
            MouseClick("left", 999, 100, 1, 5) ; กด x2
        EndIf
        If PixelGetColor(997, 159) = 0xE6CC5E Then ; สีตอนกดปุ่ม Auto
            GUICtrlSetData($List1, "[2] กำลังต่อสู้")
            $Round += 1 ; กด auto ไว้ให้นับ +1
            $Sum +=1  ; แสดงการต่อสู้ทั้งหมด
            Sleep(1000)
            GUICtrlSetData($Label1, $Round) ; แสดงเลขที่นับไว้
            GUICtrlSetData($Label2, $Sum) ; แสดงผลการต่อสู้ทั้งหมด
            Checkinput() ; ตรวจสอบ input1
        Else    
        If PixelGetColor(256, 24) = 0xFCD300 Then ; คลิ๊กที่ตัวเอง
            GUICtrlSetData($List1, "[1] กำลังค้นหามอนสเตอร์")
            MouseClick("left", 515, 301,2,5)
            Sleep(100)
        EndIf
        If PixelGetColor(256, 24) = 0xFCD300 Then ; คลิ๊กที่ตัวเอง
            GUICtrlSetData($List1, "[1] กำลังค้นหามอนสเตอร์")
            MouseClick("left", 515, 301,2,5)
            Sleep(1000)
        EndIf
            Start()
        EndIf
    WEnd
EndFunc   ;==>Start

Func Checkinput()
    While 1
        If $Round = GUICtrlRead($Input2) Then
            Beep(500, 1000) ; เตือนด้วยเสียงนาน 1 วิ
            GUICtrlSetData($List1, "[3] รอสู้เสร็จ แล้วไปหลอมอุปกรณ์")
            Do ; เริ่มการวนซ้ำ
                Sleep(100)
            Until PixelGetColor(256, 24) = 0xFCD300 ; เมื่อเจอสีนี้ให้เลิกวนแล้วทำคำสั่งต่อไป
            Item()
        Else
            Do
                Sleep(100)
                If PixelGetColor(512, 385) = 0x093F3B Then ; หลุดเข้าใหม่
                    MouseClick("left", 512, 385, 1, 5)
                EndIf
                If PixelGetColor(510, 514) = 0x6A4C38 Then ; กดปุ่ม รู้แล้ว
                    MouseClick("left", 510, 514, 1, 5)
                EndIf
                If PixelGetColor(620, 483) = 0x439376 Then ; กดปุ่ม เข้าเกมส์
                    MouseClick("left", 620, 483, 1, 5)
                EndIf
                 If PixelGetColor(950, 62) = 0xFDF6DF Then ; กดปุ่มปิดโฆษณา
                     MouseClick("left", 950, 62, 1, 5)
                 EndIf
            Until PixelGetColor(256, 24) = 0xFCD300
            Start()
        EndIf
    WEnd
EndFunc   ;==>Checkinput

Func Item()
    While 1
    If PixelGetColor(968, 201) = 0xDEC76B Then ; คลิ๊กลูกศร
        MouseClick("left", 968, 201, 1, 10)
        Sleep(1000)
    EndIf
    If PixelGetColor(908, 440) = 0xB13F03 Then ; คลิ๊กเตาหลอม
        GUICtrlSetData($List1, "[4] เลือกเมนูเตาหลอม")
        MouseClick("left", 908, 440, 1, 10)
        Sleep(1000)
    EndIf
    If PixelGetColor(376, 35) = 0x928F8E Then ; คลิ๊กอุปกรณ์
        MouseClick("left", 376, 35, 1, 10)
        Sleep(1000)
    EndIf
    If PixelGetColor(342, 24) = 0xCC7427 Then ; คลิ๊กใส่ทันที
        MouseClick("left", 559, 508, 1, 10)
        GUICtrlSetData($List1, "[5] กำลังค้นหาอุปกรณ์สีม่วงและสีทอง ถ้าพบให้เอาออกไม่ต้องหลอม")
        Sleep(3000)
    EndIf
    If PixelGetColor(486, 221) = 0xBC6C18 Then ; ตรวจสอบของทองช่อง 1 ชิ้นที่ 1
        MouseClick("left", 486, 221, 1, 10)
        Sleep(100)
    EndIf
    If PixelGetColor(486, 221) = 0xBC6C18 Then ; ตรวจสอบของทองช่อง 1 ชิ้นที่ 1
        MouseClick("left", 486, 221, 1, 10)
        Sleep(100)
    EndIf
    If PixelGetColor(587, 221) = 0xBF6F18 Then ; ตรวจสอบของทองช่อง 2 ชิ้นที่ 2
        MouseClick("left", 587, 221, 1, 10)
        Sleep(100)
    EndIf
    If PixelGetColor(587, 221) = 0xBF6F18 Then ; ตรวจสอบของทองช่อง 2 ชิ้นที่ 2
        MouseClick("left", 587, 221, 1, 10)
        Sleep(100)
    EndIf
    If PixelGetColor(687, 222) = 0xDCA933 Then ; ตรวจสอบของทองช่อง3 ชิ้นที่ 3
        MouseClick("left", 687, 222, 1, 10)
        Sleep(100)
    EndIf
    If PixelGetColor(687, 222) = 0xDCA933 Then ; ตรวจสอบของทองช่อง3 ชิ้นที่ 3
        MouseClick("left", 687, 222, 1, 10)
        Sleep(100)
    EndIf
    If PixelGetColor(787, 222) = 0xD59C2B Then ; ตรวจสอบของทองช่อง4 ชิ้นที่ 4
        MouseClick("left", 787, 222, 1, 10)
        Sleep(100)
    EndIf
    If PixelGetColor(787, 222) = 0xD59C2B Then ; ตรวจสอบของทองช่อง4 ชิ้นที่ 4
        MouseClick("left", 787, 222, 1, 10)
        Sleep(100)
    EndIf
    If PixelGetColor(885, 222) = 0xD79E2D Then ; ตรวจสอบของทองช่อง 5 ชิ้นที่ 5
        MouseClick("left", 885, 222, 1, 10)
        Sleep(100)
    EndIf
    If PixelGetColor(885, 222) = 0xD79E2D Then ; ตรวจสอบของทองช่อง 5 ชิ้นที่ 5
        MouseClick("left", 885, 222, 1, 10)
        Sleep(100)
    EndIf
    If PixelGetColor(484, 318) = 0xDDAC34 Then ; ตรวจสอบของทองช่อง6 ชิ้นที่ 6
        MouseClick("left", 484, 318, 1, 10)
        Sleep(100)
    EndIf
    If PixelGetColor(484, 318) = 0xDDAC34 Then ; ตรวจสอบของทองช่อง6 ชิ้นที่ 6
        MouseClick("left", 484, 318, 1, 10)
        Sleep(100)
    EndIf
    If PixelGetColor(587, 319) = 0xDCAA33 Then ; ตรวจสอบของทองช่อง7  ชิ้นที่ 7
        MouseClick("left", 587, 319, 1, 10)
        Sleep(100)
    EndIf    
    If PixelGetColor(587, 319) = 0xDCAA33 Then ; ตรวจสอบของทองช่อง7  ชิ้นที่ 7
        MouseClick("left", 587, 319, 1, 10)
        Sleep(100)
    EndIf    
    If PixelGetColor(688, 319) = 0xDEAE35 Then ; ตรวจสอบของทองช่อง8  ชิ้นที่ 8
        MouseClick("left", 688, 319, 1, 10)
        Sleep(100)
    EndIf
    If PixelGetColor(688, 319) = 0xDEAE35 Then ; ตรวจสอบของทองช่อง8  ชิ้นที่ 8
        MouseClick("left", 688, 319, 1, 10)
        Sleep(100)
    EndIf
    If PixelGetColor(787, 319) = 0xDFAF36 Then ; ตรวจสอบของทองช่อง9  ชิ้นที่ 9
        MouseClick("left", 787, 319, 1, 10)
        Sleep(100)
    EndIf
    If PixelGetColor(787, 319) = 0xDFAF36 Then ; ตรวจสอบของทองช่อง9  ชิ้นที่ 9
        MouseClick("left", 787, 319, 1, 10)
        Sleep(100)
    EndIf
    If PixelGetColor(885, 319) = 0xDFB036 Then ; ตรวจสอบของทองช่อง10  ชิ้นที่ 10
        MouseClick("left", 885, 319, 1, 10)
        Sleep(100)
    EndIf
    If PixelGetColor(885, 319) = 0xDFB036 Then ; ตรวจสอบของทองช่อง10  ชิ้นที่ 10
        MouseClick("left", 885, 319, 1, 10)
        Sleep(100)
    EndIf
        If PixelGetColor(486, 221) = 0x6F349E Then ; ตรวจสอบของม่วงช่อง 1 ชิ้นที่ 1
        MouseClick("left", 486, 221, 1, 10)
        Sleep(100)
    EndIf    
    If PixelGetColor(486, 221) = 0x6F349E Then ; ตรวจสอบของม่วงช่อง 1 ชิ้นที่ 1
        MouseClick("left", 486, 221, 1, 10)
        Sleep(100)
    EndIf
    If PixelGetColor(587, 221) = 0x7234A2 Then ; ตรวจสอบของม่วงช่อง 2 ชิ้นที่ 2
        MouseClick("left", 587, 221, 1, 10)
        Sleep(100)
    EndIf
    If PixelGetColor(587, 221) = 0x7234A2 Then ; ตรวจสอบของม่วงช่อง 2 ชิ้นที่ 2
        MouseClick("left", 587, 221, 1, 10)
        Sleep(100)
    EndIf
    If PixelGetColor(687, 222) = 0xB064CB Then ; ตรวจสอบของม่วงช่อง 3 ชิ้นที่ 3
        MouseClick("left", 687, 222, 1, 10)
        Sleep(100)
    EndIf
    If PixelGetColor(687, 222) = 0xB064CB Then ; ตรวจสอบของม่วงช่อง 3 ชิ้นที่ 3
        MouseClick("left", 687, 222, 1, 10)
        Sleep(100)
    EndIf
    If PixelGetColor(787, 222) = 0xA156C2 Then ; ตรวจสอบของม่วงช่อง 4 ชิ้นที่ 4
        MouseClick("left", 787, 222, 1, 10)
        Sleep(100)
    EndIf
    If PixelGetColor(787, 222) = 0xA156C2 Then ; ตรวจสอบของม่วงช่อง 4 ชิ้นที่ 4
        MouseClick("left", 787, 222, 1, 10)
        Sleep(100)
    EndIf    
    If PixelGetColor(885, 222) = 0xA459C4 Then ; ตรวจสอบของม่วงช่อง 5 ชิ้นที่ 5
        MouseClick("left", 885, 222, 1, 10)
        Sleep(100)
    EndIf
    If PixelGetColor(885, 222) = 0xA459C4 Then ; ตรวจสอบของม่วงช่อง 5 ชิ้นที่ 5
        MouseClick("left", 885, 222, 1, 10)
        Sleep(100)
    EndIf    
    If PixelGetColor(484, 318) = 0xB466CC Then ; ตรวจสอบของม่วงช่อง 6 ชิ้นที่ 6
        MouseClick("left", 484, 318, 1, 10)
        Sleep(100)
    EndIf
    If PixelGetColor(484, 318) = 0xB466CC Then ; ตรวจสอบของม่วงช่อง 6 ชิ้นที่ 6
        MouseClick("left", 484, 318, 1, 10)
        Sleep(100)
    EndIf
    If PixelGetColor(587, 319) = 0xB164CB Then ; ตรวจสอบของม่วงช่อง 7  ชิ้นที่ 7
        MouseClick("left", 587, 319, 1, 10)
        Sleep(100)
    EndIf
    If PixelGetColor(587, 319) = 0xB164CB Then ; ตรวจสอบของม่วงช่อง 7  ชิ้นที่ 7
        MouseClick("left", 587, 319, 1, 10)
        Sleep(100)
    EndIf
    If PixelGetColor(688, 319) = 0xB568CD Then ; ตรวจสอบของม่วงช่อง 8  ชิ้นที่ 8
        MouseClick("left", 688, 319, 1, 10)
        Sleep(100)
    EndIf
    If PixelGetColor(688, 319) = 0xB568CD Then ; ตรวจสอบของม่วงช่อง 8  ชิ้นที่ 8
        MouseClick("left", 688, 319, 1, 10)
        Sleep(100)
    EndIf
    If PixelGetColor(787, 319) = 0xB669CE Then ; ตรวจสอบของม่วงช่อง 9  ชิ้นที่ 9
        MouseClick("left", 787, 319, 1, 10)
        Sleep(100)
    EndIf
    If PixelGetColor(787, 319) = 0xB669CE Then ; ตรวจสอบของม่วงช่อง 9  ชิ้นที่ 9
        MouseClick("left", 787, 319, 1, 10)
        Sleep(100)
    EndIf
    If PixelGetColor(885, 319) = 0xB769CF Then ; ตรวจสอบของม่วงช่อง 10  ชิ้นที่ 10
        MouseClick("left", 885, 319, 1, 10)
        Sleep(100)
    EndIf
        If PixelGetColor(885, 319) = 0xB769CF Then ; ตรวจสอบของม่วงช่อง 10  ชิ้นที่ 10
        MouseClick("left", 885, 319, 1, 10)
        Sleep(100)
        Closeitem()
     EndIf
    If PixelGetColor(521, 191) = 0x473825 Then ; ไม่มีไอเทมให้หลอมและปิดหน้าเตาหลอม
        Sleep(3000)
        GUICtrlSetData($List1, "[6] ไม่มีไอเทมให้หลอม")
        Closeitem()
    Else
        GUICtrlSetData($List1, "[7] หลอมอุปกรณ์")
        If PixelGetColor(342, 24) = 0xCC7427 Then
        MouseClick("left", 888, 512, 1, 10)
        Sleep(100)
        MouseClick("left", 509, 376, 1, 10)
        Sleep(100)
        Closeitem()
    EndIf
    EndIf
    WEnd
    EndFunc   ;==>Item
    
    

Func Closeitem()
    While 1
    If PixelGetColor(987, 34) = 0xFCF5DF Then ; ปิดหน้าเตาหลอม
        GUICtrlSetData($List1, "[8] ออกจากเมนูหลอมอุปกรณ์")
        Sleep(100)
        $Round = 0 ; ลบค่าการนับทั้งหมดให้เป็น 0
        MouseClick("left", 987, 34, 1, 10)
        Sleep(100)
        Start()
    EndIf
    WEnd
EndFunc   ;==>Closeitem


 Func  CloseChat()
     While 1
    If PixelGetColor(888, 15) = 0xF7E0BA Then ; กดปุ่มช่องพูดคุย
    GUICtrlSetData($List1, "[10] ปิดปุ่มช่องพูดคุย")
    
            MouseClick("left", 888,15, 1, 5)
             Sleep(100)
            Start()
        EndIf
        WEnd
 EndFunc

Func Button1Click()
$ButtonStart = 1
GUICtrlSetData($Input1,$var)
Start()
EndFunc   ;==>Button1Click
Func Button2Click()
    Exit
EndFunc   ;==>Button2Click
Func Button3Click()
$var = DriveGetSerial("c:\")
GUICtrlSetData($Input1, $var)
EndFunc   ;==>Button3Click
Func Form1Close()
    Exit
EndFunc   ;==>Form1_1Close
Func Form1Maximize()

EndFunc   ;==>Form1_1Maximize
Func Form1Minimize()

EndFunc   ;==>Form1_1Minimize
Func Form1Restore()

EndFunc   ;==>Form1_1Restore
Func Input1Change()

EndFunc   ;==>Input1Change
Func Input2Change()

EndFunc   ;==>Input2Change
Func Label1Click()

EndFunc   ;==>Label1Click
Func Label2Click()

EndFunc   ;==>Label2Click
Func Label3Click()

EndFunc   ;==>Label3Click
Func List1Click()

EndFunc   ;==>List1Click
Func Pic1Click()

EndFunc   ;==>Pic1Click

Func Stop()
    Exit
EndFunc   ;==>Stop

 

593392ca03293_AutoItError.png.1deecec82f2c3697a58ea142a57ad4c4.png

Share this post


Link to post
Share on other sites

#14 ·  Posted

Look at line 141, the Function Start() is calling itself, that's probably the source of the error.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.