Crashing Macro (out of memory)

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
NewYears1978
Posts: 20
Joined: 09 Jun 2016, 07:44

Crashing Macro (out of memory)

02 Jul 2021, 12:20

This macro works but it seems like it continuously run because eventually it crashes. Do I need to exit or clear variables or something else?

I have a separate macro that stores the variables and I use them through the loop..but I feel like I am missing something?

Code: Select all

InputBox, ECvar_loopcount, My Input Box, How many times to run?
EClab_Start:
Loop, %ECvar_loopcount%
{
    Send, {End}
    Sleep, 300
    Click, 525, 774 Left, 1
    Sleep, 10
    Sleep, 300
    Send, {Control Down}{a}{Control Up}
    SendRaw, %ECvar_Date%
    Sleep, 1000
    Click, 1903, 1080 Left, 1
    Sleep, 10
    Send, {Home}
    Loop
    {
        CoordMode, Pixel, Client
        PixelSearch, FoundX, FoundY, 0, 0, 2048, 1152, 0x0078EF, 0, Fast RGB
    }
    Until ErrorLevel = 0
    Click, 1322, 432 Left, 1
    Sleep, 10
    Send, {Control Down}{a}{Control Up}
    SendRaw, %ECvar_Subject%  
    Click, 1311, 495 Left, 1
    Sleep, 10
    Send, {Control Down}{a}{Control Up}
    SendRaw, %ECvar_Subject2%  
    Sleep, 10
    Send, {Backspace}
    SendRaw, %ECvar_ID% 
    Click, 1292, 699 Left, 1
    Sleep, 10
    Send, {Backspace}
    SendRaw, %ECvar_ID% 
    Click, 1873, 1077 Left, 1
    Sleep, 10
    Loop
    {
        CoordMode, Pixel, Client
        PixelSearch, FoundX, FoundY, 1761, 1044, 2012, 1110, 0x041156, 0, Fast RGB
    }
    Until ErrorLevel = 0
    Send, {Control Down}{Tab}
    /*{F4}
    */{Control Up}
    Sleep, 1000
}
I feel like maybe the pixel search continues to run even though it is found and moves on..or something else just keeps looping in the bkg causing crash.
swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: Crashing Macro (out of memory)

02 Jul 2021, 12:29

and how exactly do u figure it runs out of memory "because eventually it crashes"?
the script that u posted, at best would exit(since theres nothing preventing that) after a certain number of loop iterations(however many u typed in at the start) and at worst run indefinitely(cause it cant find one of the specified colors on screen)
NewYears1978
Posts: 20
Joined: 09 Jun 2016, 07:44

Re: Crashing Macro (out of memory)

08 Jul 2021, 13:33

swagfag wrote:
02 Jul 2021, 12:29
and how exactly do u figure it runs out of memory "because eventually it crashes"?
the script that u posted, at best would exit(since theres nothing preventing that) after a certain number of loop iterations(however many u typed in at the start) and at worst run indefinitely(cause it cant find one of the specified colors on screen)
Oh I don't know if that's the case. I realized I Posted this in the wrong place I meant to post it in Pulover, so I reposted it. My apologies.

It's Pulovers that is crashing. I think I even got an out of memory popup a few times.

This can be closed/deleted since I posted it in the correct place. (I thought it was a macro specific issue but I think it is not)

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: madensuyu1, peter_ahk and 358 guests