Jump to content

Script working on Win10 but slow on Win7 and microfreezing - (Locked)


Recommended Posts

Hi guys, i'm running an simple loop with imagesearch for a beep alert and a simple controlclick for multiple windows that is working perfect on a windows 10 machine, but on a windows 7 on the same machine its slow and weird part is while its running it makes a pain to alt+tab windows, and its impossible to watch youtube or any streaming service cause its microfreezing. The strange part is i can play normally or watch video on MPC without freezing problem. Anyone know hot to fix? Searched the forum, found only one topic with similar problem from 2016 but no fix. My code is down there for review if needed.

I'm on a Win7 fully updated with all net framework on c++ installed, the cpu is an R7 2700x.

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Icon=quakechamps.ico
#AutoIt3Wrapper_UseX64=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <ImageSearch2015.au3>
#include <ScreenCapture.au3>
#Include <Timers.au3>
#include <MsgBoxConstants.au3>

HotKeySet("+!{PGDN}", "ExitProg")
OnAutoItExitRegister("KillAllAIO__Process")

Global $y = 0, $x = 0, $nm1x, $nm1y, $nx41x, $nx41y, $nm2x, $nm2y, $nx42x, $nx42y, $nm3x, $nm3y, $nx43x, $nx43y, $nm4x, $nm4y, $nx44x, $nx44y, $nm5x, $nm5y, $nx45x, $nx45y, $nm6x, $nm6y, $nx46x, $nx46y, $nm7x, $nm7y, $nx47x, $nx47y, $nm8x, $nm8y, $nx48x, $nx48y, $nm9x, $nm9y, $nx49x, $nx49y, $nm10x, $nm10y, $nx410x, $nx410y, $bslg1x, $bslg1y, $bslg2x, $bslg2y, $bslg3x, $bslg3y, $bslg4x, $bslg4y, $bslg5x, $bslg5y, $bslg6x, $bslg6y, $bslg7x, $bslg7y, $bslg8x, $bslg8y, $bslg9x, $bslg9y, $bslg10x, $bslg10y, $sgrre1x, $sgrre1y, $sgrre2x, $sgrre2y, $sgrre3x, $sgrre3y, $sgrre4x, $sgrre4y, $sgrre5x, $sgrre5y, $sgrre6x, $sgrre6y, $sgrre7x, $sgrre7y, $sgrre8x, $sgrre8y, $sgrre9x, $sgrre9y, $sgrre10x, $sgrre10y, $10RResults1x, $10RResults1y, $10RResults2x, $10RResults2y, $10RResults3x, $10RResults3y, $10RResults4x, $10RResults4y, $10RResults5x, $10RResults5y, $10RResults6x, $10RResults6y, $10RResults7x, $10RResults7y, $10RResults8x, $10RResults8y, $10RResults9x, $10RResults9y, $10RResults10x, $10RResults10y, $controlID

$nm1 = "images\nm11a.png"
$nm2 = "images\nm12a.png"
$nm3 = "images\nm13a.png"
$nm4 = "images\nm14a.png"
$nm5 = "images\nm15a.png"
$nm6 = "images\nm16a.png"
$nm7 = "images\nm17a.png"
$nm8 = "images\nm18a.png"
$nm9 = "images\nm19a.png"
$nm10 = "images\nm110a.png"

$nx41 = "images\nx411a.png"
$nx42 = "images\nx412a.png"
$nx43 = "images\nx413a.png"
$nx44 = "images\nx414a.png"
$nx45 = "images\nx415a.png"
$nx46 = "images\nx416a.png"
$nx47 = "images\nx417a.png"
$nx48 = "images\nx418a.png"
$nx49 = "images\nx419a.png"
$nx410 = "images\nx4110a.png"

$10RResults = "images\10RResults.png"

$sgrre = "images\sgrre.png"

$bslg1 = "images\gnj11x_03.png"
$bslg2 = "images\gnj11x_06.png"
$bslg3 = "images\gnj11x_09.png"
$bslg4 = "images\v2kt11x_03.png"
$bslg5 = "images\crrt11x_03.png"

If @Compiled = 0 Then
    MsgBox(0,"","This Script must compiled to properly Function")
    Exit
EndIf

If $CMDLine[0] > 0 Then
    Opt("TrayIconHide", 1)
    If $CMDLine[1] = "/nx1" Then
        nx1()
        Exit
    EndIf
    If $CMDLine[1] = "/nx2" Then
        nx2()
        Exit
    EndIf
    If $CMDLine[1] = "/nx3" Then
        nx3()
        Exit
    EndIf
    If $CMDLine[1] = "/nx4" Then
        nx4()
        Exit
    EndIf
    If $CMDLine[1] = "/nx5" Then
        nx5()
        Exit
    EndIf
    If $CMDLine[1] = "/nx6" Then
        nx6()
        Exit
    EndIf
    If $CMDLine[1] = "/nx7" Then
        nx7()
        Exit
    EndIf
    If $CMDLine[1] = "/nx8" Then
        nx8()
        Exit
    EndIf
    If $CMDLine[1] = "/nx9" Then
        nx9()
        Exit
    EndIf
    If $CMDLine[1] = "/nx10" Then
        nx10()
        Exit
    EndIf
    Opt("TrayIconHide", 0)
    Sleep (100)
EndIf

Func searchnx1()
    If WinExists("nx(1)") Then
        $searchnx1Pos = WinGetPos("nx(1)")
        If _ImageSearchArea($nm1, 1, $searchnx1Pos[0], $searchnx1Pos[1], $searchnx1Pos[0]+$searchnx1Pos[2], $searchnx1Pos[1]+$searchnx1Pos[3], $nm1x, $nm1y, 96, 0) = 1 or _ImageSearchArea($nm2, 1, $searchnx1Pos[0], $searchnx1Pos[1], $searchnx1Pos[0]+$searchnx1Pos[2], $searchnx1Pos[1]+$searchnx1Pos[3], $nm1x, $nm1y, 96, 0) = 1 or _ImageSearchArea($nm3, 1, $searchnx1Pos[0], $searchnx1Pos[1], $searchnx1Pos[0]+$searchnx1Pos[2], $searchnx1Pos[1]+$searchnx1Pos[3], $nm1x, $nm1y, 96, 0) = 1 or _ImageSearchArea($nm4, 1, $searchnx1Pos[0], $searchnx1Pos[1], $searchnx1Pos[0]+$searchnx1Pos[2], $searchnx1Pos[1]+$searchnx1Pos[3], $nm1x, $nm1y, 96, 0) = 1 or _ImageSearchArea($nm5, 1, $searchnx1Pos[0], $searchnx1Pos[1], $searchnx1Pos[0]+$searchnx1Pos[2], $searchnx1Pos[1]+$searchnx1Pos[3], $nm1x, $nm1y, 96, 0) = 1 or _ImageSearchArea($nm6, 1, $searchnx1Pos[0], $searchnx1Pos[1], $searchnx1Pos[0]+$searchnx1Pos[2], $searchnx1Pos[1]+$searchnx1Pos[3], $nm1x, $nm1y, 96, 0) = 1 or _ImageSearchArea($nm7, 1, $searchnx1Pos[0], $searchnx1Pos[1], $searchnx1Pos[0]+$searchnx1Pos[2], $searchnx1Pos[1]+$searchnx1Pos[3], $nm1x, $nm1y, 96, 0) = 1 or _ImageSearchArea($nm8, 1, $searchnx1Pos[0], $searchnx1Pos[1], $searchnx1Pos[0]+$searchnx1Pos[2], $searchnx1Pos[1]+$searchnx1Pos[3], $nm1x, $nm1y, 96, 0) = 1 or _ImageSearchArea($nm9, 1, $searchnx1Pos[0], $searchnx1Pos[1], $searchnx1Pos[0]+$searchnx1Pos[2], $searchnx1Pos[1]+$searchnx1Pos[3], $nm1x, $nm1y, 96, 0) = 1 or _ImageSearchArea($nm10, 1, $searchnx1Pos[0], $searchnx1Pos[1], $searchnx1Pos[0]+$searchnx1Pos[2], $searchnx1Pos[1]+$searchnx1Pos[3], $nm1x, $nm1y, 96, 0) = 1 Then
            If _ImageSearchArea($nx41, 1, $searchnx1Pos[0], $searchnx1Pos[1], $searchnx1Pos[0]+$searchnx1Pos[2], $searchnx1Pos[1]+$searchnx1Pos[3], $nx41x, $nx41y, 96, 0) = 1 or _ImageSearchArea($nx42, 1, $searchnx1Pos[0], $searchnx1Pos[1], $searchnx1Pos[0]+$searchnx1Pos[2], $searchnx1Pos[1]+$searchnx1Pos[3], $nx41x, $nx41y, 96, 0) = 1 or _ImageSearchArea($nx43, 1, $searchnx1Pos[0], $searchnx1Pos[1], $searchnx1Pos[0]+$searchnx1Pos[2], $searchnx1Pos[1]+$searchnx1Pos[3], $nx41x, $nx41y, 96, 0) = 1 or _ImageSearchArea($nx44, 1, $searchnx1Pos[0], $searchnx1Pos[1], $searchnx1Pos[0]+$searchnx1Pos[2], $searchnx1Pos[1]+$searchnx1Pos[3], $nx41x, $nx41y, 96, 0) = 1 or _ImageSearchArea($nx45, 1, $searchnx1Pos[0], $searchnx1Pos[1], $searchnx1Pos[0]+$searchnx1Pos[2], $searchnx1Pos[1]+$searchnx1Pos[3], $nx41x, $nx41y, 96, 0) = 1 or _ImageSearchArea($nx46, 1, $searchnx1Pos[0], $searchnx1Pos[1], $searchnx1Pos[0]+$searchnx1Pos[2], $searchnx1Pos[1]+$searchnx1Pos[3], $nx41x, $nx41y, 96, 0) = 1 or _ImageSearchArea($nx47, 1, $searchnx1Pos[0], $searchnx1Pos[1], $searchnx1Pos[0]+$searchnx1Pos[2], $searchnx1Pos[1]+$searchnx1Pos[3], $nx41x, $nx41y, 96, 0) = 1 or _ImageSearchArea($nx48, 1, $searchnx1Pos[0], $searchnx1Pos[1], $searchnx1Pos[0]+$searchnx1Pos[2], $searchnx1Pos[1]+$searchnx1Pos[3], $nx41x, $nx41y, 96, 0) = 1 or _ImageSearchArea($nx49, 1, $searchnx1Pos[0], $searchnx1Pos[1], $searchnx1Pos[0]+$searchnx1Pos[2], $searchnx1Pos[1]+$searchnx1Pos[3], $nx41x, $nx41y, 96, 0) = 1 or _ImageSearchArea($nx410, 1, $searchnx1Pos[0], $searchnx1Pos[1], $searchnx1Pos[0]+$searchnx1Pos[2], $searchnx1Pos[1]+$searchnx1Pos[3], $nx41x, $nx41y, 96, 0) = 1 Then
                ControlClick("nx(1)","", "", "left",1,138,17)
                Beep(500, 1000)
                Sleep (120000)
            EndIf
        EndIf
        If _ImageSearchArea($bslg1, 1, $searchnx1Pos[0], $searchnx1Pos[1], $searchnx1Pos[0]+$searchnx1Pos[2], $searchnx1Pos[1]+$searchnx1Pos[3], $bslg1x, $bslg1y, 96, 0) = 1 or _ImageSearchArea($bslg2, 1, $searchnx1Pos[0], $searchnx1Pos[1], $searchnx1Pos[0]+$searchnx1Pos[2], $searchnx1Pos[1]+$searchnx1Pos[3], $bslg1x, $bslg1y, 96, 0) = 1 or _ImageSearchArea($bslg3, 1, $searchnx1Pos[0], $searchnx1Pos[1], $searchnx1Pos[0]+$searchnx1Pos[2], $searchnx1Pos[1]+$searchnx1Pos[3], $bslg1x, $bslg1y, 96, 0) = 1 or _ImageSearchArea($bslg4, 1, $searchnx1Pos[0], $searchnx1Pos[1], $searchnx1Pos[0]+$searchnx1Pos[2], $searchnx1Pos[1]+$searchnx1Pos[3], $bslg1x, $bslg1y, 96, 0) = 1 or _ImageSearchArea($bslg5, 1, $searchnx1Pos[0], $searchnx1Pos[1], $searchnx1Pos[0]+$searchnx1Pos[2], $searchnx1Pos[1]+$searchnx1Pos[3], $bslg1x, $bslg1y, 96, 0) = 1 Then
            ControlClick("nx(1)","", "", "left",1,138,17)
            Beep(500, 1000)
            Sleep (120000)
        EndIf
        If _ImageSearchArea($10RResults, 1, $searchnx1Pos[0], $searchnx1Pos[1], $searchnx1Pos[0]+$searchnx1Pos[2], $searchnx1Pos[1]+$searchnx1Pos[3], $10RResults1x, $10RResults1y, 96, 0) = 1 Then
            If Not FileExists (@ScriptDir & "\SS") Then
            DirCreate (@ScriptDir & "\SS")
            EndIf
            _ScreenCapture_CaptureWnd(@ScriptDir & "\SS" & "\10RResults_"& @YEAR & @MON & @MDAY & @HOUR & @MIN & @SEC & @MSEC & ".png", "nx(1)")
            Sleep (10000)
        EndIf
        If _ImageSearchArea($sgrre, 1, $searchnx1Pos[0], $searchnx1Pos[1], $searchnx1Pos[0]+$searchnx1Pos[2], $searchnx1Pos[1]+$searchnx1Pos[3], $sgrre1x, $sgrre1y, 48, 0) = 1 Then
            If Not FileExists (@ScriptDir & "\SS") Then
            DirCreate (@ScriptDir & "\SS")
            EndIf
            Sleep(925)
            _ScreenCapture_CaptureWnd(@ScriptDir & "\SS" & "\sgrre_"& @YEAR & @MON & @MDAY & @HOUR & @MIN & @SEC & @MSEC & ".png", "nx(1)")
            Sleep (5500)
        EndIf
        Sleep (333)
    Else
        Sleep (60000)
    EndIf
EndFunc

Func searchnx2()
    If WinExists("nx(2)") Then
        $searchnx2Pos = WinGetPos("nx(2)")
        If _ImageSearchArea($nm1, 1, $searchnx2Pos[0], $searchnx2Pos[1], $searchnx2Pos[0]+$searchnx2Pos[2], $searchnx2Pos[1]+$searchnx2Pos[3], $nm2x, $nm2y, 96, 0) = 1 or _ImageSearchArea($nm2, 1, $searchnx2Pos[0], $searchnx2Pos[1], $searchnx2Pos[0]+$searchnx2Pos[2], $searchnx2Pos[1]+$searchnx2Pos[3], $nm2x, $nm2y, 96, 0) = 1 or _ImageSearchArea($nm3, 1, $searchnx2Pos[0], $searchnx2Pos[1], $searchnx2Pos[0]+$searchnx2Pos[2], $searchnx2Pos[1]+$searchnx2Pos[3], $nm2x, $nm2y, 96, 0) = 1 or _ImageSearchArea($nm4, 1, $searchnx2Pos[0], $searchnx2Pos[1], $searchnx2Pos[0]+$searchnx2Pos[2], $searchnx2Pos[1]+$searchnx2Pos[3], $nm2x, $nm2y, 96, 0) = 1 or _ImageSearchArea($nm5, 1, $searchnx2Pos[0], $searchnx2Pos[1], $searchnx2Pos[0]+$searchnx2Pos[2], $searchnx2Pos[1]+$searchnx2Pos[3], $nm2x, $nm2y, 96, 0) = 1 or _ImageSearchArea($nm6, 1, $searchnx2Pos[0], $searchnx2Pos[1], $searchnx2Pos[0]+$searchnx2Pos[2], $searchnx2Pos[1]+$searchnx2Pos[3], $nm2x, $nm2y, 96, 0) = 1 or _ImageSearchArea($nm7, 1, $searchnx2Pos[0], $searchnx2Pos[1], $searchnx2Pos[0]+$searchnx2Pos[2], $searchnx2Pos[1]+$searchnx2Pos[3], $nm2x, $nm2y, 96, 0) = 1 or _ImageSearchArea($nm8, 1, $searchnx2Pos[0], $searchnx2Pos[1], $searchnx2Pos[0]+$searchnx2Pos[2], $searchnx2Pos[1]+$searchnx2Pos[3], $nm2x, $nm2y, 96, 0) = 1 or _ImageSearchArea($nm9, 1, $searchnx2Pos[0], $searchnx2Pos[1], $searchnx2Pos[0]+$searchnx2Pos[2], $searchnx2Pos[1]+$searchnx2Pos[3], $nm2x, $nm2y, 96, 0) = 1 or _ImageSearchArea($nm10, 1, $searchnx2Pos[0], $searchnx2Pos[1], $searchnx2Pos[0]+$searchnx2Pos[2], $searchnx2Pos[1]+$searchnx2Pos[3], $nm2x, $nm2y, 96, 0) = 1 Then
            If _ImageSearchArea($nx41, 1, $searchnx2Pos[0], $searchnx2Pos[1], $searchnx2Pos[0]+$searchnx2Pos[2], $searchnx2Pos[1]+$searchnx2Pos[3], $nx42x, $nx42y, 96, 0) = 1 or _ImageSearchArea($nx42, 1, $searchnx2Pos[0], $searchnx2Pos[1], $searchnx2Pos[0]+$searchnx2Pos[2], $searchnx2Pos[1]+$searchnx2Pos[3], $nx42x, $nx42y, 96, 0) = 1 or _ImageSearchArea($nx43, 1, $searchnx2Pos[0], $searchnx2Pos[1], $searchnx2Pos[0]+$searchnx2Pos[2], $searchnx2Pos[1]+$searchnx2Pos[3], $nx42x, $nx42y, 96, 0) = 1 or _ImageSearchArea($nx44, 1, $searchnx2Pos[0], $searchnx2Pos[1], $searchnx2Pos[0]+$searchnx2Pos[2], $searchnx2Pos[1]+$searchnx2Pos[3], $nx42x, $nx42y, 96, 0) = 1 or _ImageSearchArea($nx45, 1, $searchnx2Pos[0], $searchnx2Pos[1], $searchnx2Pos[0]+$searchnx2Pos[2], $searchnx2Pos[1]+$searchnx2Pos[3], $nx42x, $nx42y, 96, 0) = 1 or _ImageSearchArea($nx46, 1, $searchnx2Pos[0], $searchnx2Pos[1], $searchnx2Pos[0]+$searchnx2Pos[2], $searchnx2Pos[1]+$searchnx2Pos[3], $nx42x, $nx42y, 96, 0) = 1 or _ImageSearchArea($nx47, 1, $searchnx2Pos[0], $searchnx2Pos[1], $searchnx2Pos[0]+$searchnx2Pos[2], $searchnx2Pos[1]+$searchnx2Pos[3], $nx42x, $nx42y, 96, 0) = 1 or _ImageSearchArea($nx48, 1, $searchnx2Pos[0], $searchnx2Pos[1], $searchnx2Pos[0]+$searchnx2Pos[2], $searchnx2Pos[1]+$searchnx2Pos[3], $nx42x, $nx42y, 96, 0) = 1 or _ImageSearchArea($nx49, 1, $searchnx2Pos[0], $searchnx2Pos[1], $searchnx2Pos[0]+$searchnx2Pos[2], $searchnx2Pos[1]+$searchnx2Pos[3], $nx42x, $nx42y, 96, 0) = 1 or _ImageSearchArea($nx410, 1, $searchnx2Pos[0], $searchnx2Pos[1], $searchnx2Pos[0]+$searchnx2Pos[2], $searchnx2Pos[1]+$searchnx2Pos[3], $nx42x, $nx42y, 96, 0) = 1 Then
                ControlClick("nx(2)","", "", "left",1,138,17)
                Beep(500, 1000)
                Sleep (120000)
            EndIf
        EndIf
        If _ImageSearchArea($bslg1, 1, $searchnx2Pos[0], $searchnx2Pos[1], $searchnx2Pos[0]+$searchnx2Pos[2], $searchnx2Pos[1]+$searchnx2Pos[3], $bslg2x, $bslg2y, 96, 0) = 1 or _ImageSearchArea($bslg2, 1, $searchnx2Pos[0], $searchnx2Pos[1], $searchnx2Pos[0]+$searchnx2Pos[2], $searchnx2Pos[1]+$searchnx2Pos[3], $bslg2x, $bslg2y, 96, 0) = 1 or _ImageSearchArea($bslg3, 1, $searchnx2Pos[0], $searchnx2Pos[1], $searchnx2Pos[0]+$searchnx2Pos[2], $searchnx2Pos[1]+$searchnx2Pos[3], $bslg2x, $bslg2y, 96, 0) = 1 or _ImageSearchArea($bslg4, 1, $searchnx2Pos[0], $searchnx2Pos[1], $searchnx2Pos[0]+$searchnx2Pos[2], $searchnx2Pos[1]+$searchnx2Pos[3], $bslg2x, $bslg2y, 96, 0) = 1 or _ImageSearchArea($bslg5, 1, $searchnx2Pos[0], $searchnx2Pos[1], $searchnx2Pos[0]+$searchnx2Pos[2], $searchnx2Pos[1]+$searchnx2Pos[3], $bslg2x, $bslg2y, 96, 0) = 1 Then
            ControlClick("nx(2)","", "", "left",1,138,17)
            Beep(500, 1000)
            Sleep (120000)
        EndIf
        If _ImageSearchArea($10RResults, 1, $searchnx2Pos[0], $searchnx2Pos[1], $searchnx2Pos[0]+$searchnx2Pos[2], $searchnx2Pos[1]+$searchnx2Pos[3], $10RResults2x, $10RResults2y, 96, 0) = 1 Then
            If Not FileExists (@ScriptDir & "\SS") Then
            DirCreate (@ScriptDir & "\SS")
            EndIf
            _ScreenCapture_CaptureWnd(@ScriptDir & "\SS" & "\10RResults_"& @YEAR & @MON & @MDAY & @HOUR & @MIN & @SEC & @MSEC & ".png", "nx(2)")
            Sleep (10000)
        EndIf
        If _ImageSearchArea($sgrre, 1, $searchnx2Pos[0], $searchnx2Pos[1], $searchnx2Pos[0]+$searchnx2Pos[2], $searchnx2Pos[1]+$searchnx2Pos[3], $sgrre2x, $sgrre2y, 48, 0) = 1 Then
            If Not FileExists (@ScriptDir & "\SS") Then
            DirCreate (@ScriptDir & "\SS")
            EndIf
            Sleep(925)
            _ScreenCapture_CaptureWnd(@ScriptDir & "\SS" & "\sgrre_"& @YEAR & @MON & @MDAY & @HOUR & @MIN & @SEC & @MSEC & ".png", "nx(2)")
            Sleep (5500)
        EndIf
        Sleep (333)
    Else
        Sleep (60000)
    EndIf
EndFunc

Func searchnx3()
    If WinExists("nx(3)") Then
        $searchnx3Pos = WinGetPos("nx(3)")
        If _ImageSearchArea($nm1, 1, $searchnx3Pos[0], $searchnx3Pos[1], $searchnx3Pos[0]+$searchnx3Pos[2], $searchnx3Pos[1]+$searchnx3Pos[3], $nm3x, $nm3y, 96, 0) = 1 or _ImageSearchArea($nm2, 1, $searchnx3Pos[0], $searchnx3Pos[1], $searchnx3Pos[0]+$searchnx3Pos[2], $searchnx3Pos[1]+$searchnx3Pos[3], $nm3x, $nm3y, 96, 0) = 1 or _ImageSearchArea($nm3, 1, $searchnx3Pos[0], $searchnx3Pos[1], $searchnx3Pos[0]+$searchnx3Pos[2], $searchnx3Pos[1]+$searchnx3Pos[3], $nm3x, $nm3y, 96, 0) = 1 or _ImageSearchArea($nm4, 1, $searchnx3Pos[0], $searchnx3Pos[1], $searchnx3Pos[0]+$searchnx3Pos[2], $searchnx3Pos[1]+$searchnx3Pos[3], $nm3x, $nm3y, 96, 0) = 1 or _ImageSearchArea($nm5, 1, $searchnx3Pos[0], $searchnx3Pos[1], $searchnx3Pos[0]+$searchnx3Pos[2], $searchnx3Pos[1]+$searchnx3Pos[3], $nm3x, $nm3y, 96, 0) = 1 or _ImageSearchArea($nm6, 1, $searchnx3Pos[0], $searchnx3Pos[1], $searchnx3Pos[0]+$searchnx3Pos[2], $searchnx3Pos[1]+$searchnx3Pos[3], $nm3x, $nm3y, 96, 0) = 1 or _ImageSearchArea($nm7, 1, $searchnx3Pos[0], $searchnx3Pos[1], $searchnx3Pos[0]+$searchnx3Pos[2], $searchnx3Pos[1]+$searchnx3Pos[3], $nm3x, $nm3y, 96, 0) = 1 or _ImageSearchArea($nm8, 1, $searchnx3Pos[0], $searchnx3Pos[1], $searchnx3Pos[0]+$searchnx3Pos[2], $searchnx3Pos[1]+$searchnx3Pos[3], $nm3x, $nm3y, 96, 0) = 1 or _ImageSearchArea($nm9, 1, $searchnx3Pos[0], $searchnx3Pos[1], $searchnx3Pos[0]+$searchnx3Pos[2], $searchnx3Pos[1]+$searchnx3Pos[3], $nm3x, $nm3y, 96, 0) = 1 or _ImageSearchArea($nm10, 1, $searchnx3Pos[0], $searchnx3Pos[1], $searchnx3Pos[0]+$searchnx3Pos[2], $searchnx3Pos[1]+$searchnx3Pos[3], $nm3x, $nm3y, 96, 0) = 1 Then
            If _ImageSearchArea($nx41, 1, $searchnx3Pos[0], $searchnx3Pos[1], $searchnx3Pos[0]+$searchnx3Pos[2], $searchnx3Pos[1]+$searchnx3Pos[3], $nx43x, $nx43y, 96, 0) = 1 or _ImageSearchArea($nx42, 1, $searchnx3Pos[0], $searchnx3Pos[1], $searchnx3Pos[0]+$searchnx3Pos[2], $searchnx3Pos[1]+$searchnx3Pos[3], $nx43x, $nx43y, 96, 0) = 1 or _ImageSearchArea($nx43, 1, $searchnx3Pos[0], $searchnx3Pos[1], $searchnx3Pos[0]+$searchnx3Pos[2], $searchnx3Pos[1]+$searchnx3Pos[3], $nx43x, $nx43y, 96, 0) = 1 or _ImageSearchArea($nx44, 1, $searchnx3Pos[0], $searchnx3Pos[1], $searchnx3Pos[0]+$searchnx3Pos[2], $searchnx3Pos[1]+$searchnx3Pos[3], $nx43x, $nx43y, 96, 0) = 1 or _ImageSearchArea($nx45, 1, $searchnx3Pos[0], $searchnx3Pos[1], $searchnx3Pos[0]+$searchnx3Pos[2], $searchnx3Pos[1]+$searchnx3Pos[3], $nx43x, $nx43y, 96, 0) = 1 or _ImageSearchArea($nx46, 1, $searchnx3Pos[0], $searchnx3Pos[1], $searchnx3Pos[0]+$searchnx3Pos[2], $searchnx3Pos[1]+$searchnx3Pos[3], $nx43x, $nx43y, 96, 0) = 1 or _ImageSearchArea($nx47, 1, $searchnx3Pos[0], $searchnx3Pos[1], $searchnx3Pos[0]+$searchnx3Pos[2], $searchnx3Pos[1]+$searchnx3Pos[3], $nx43x, $nx43y, 96, 0) = 1 or _ImageSearchArea($nx48, 1, $searchnx3Pos[0], $searchnx3Pos[1], $searchnx3Pos[0]+$searchnx3Pos[2], $searchnx3Pos[1]+$searchnx3Pos[3], $nx43x, $nx43y, 96, 0) = 1 or _ImageSearchArea($nx49, 1, $searchnx3Pos[0], $searchnx3Pos[1], $searchnx3Pos[0]+$searchnx3Pos[2], $searchnx3Pos[1]+$searchnx3Pos[3], $nx43x, $nx43y, 96, 0) = 1 or _ImageSearchArea($nx410, 1, $searchnx3Pos[0], $searchnx3Pos[1], $searchnx3Pos[0]+$searchnx3Pos[2], $searchnx3Pos[1]+$searchnx3Pos[3], $nx43x, $nx43y, 96, 0) = 1 Then
                ControlClick("nx(3)","", "", "left",1,138,17)
                Beep(500, 1000)
                Sleep (120000)
            EndIf
        EndIf
        If _ImageSearchArea($bslg1, 1, $searchnx3Pos[0], $searchnx3Pos[1], $searchnx3Pos[0]+$searchnx3Pos[2], $searchnx3Pos[1]+$searchnx3Pos[3], $bslg3x, $bslg3y, 96, 0) = 1 or _ImageSearchArea($bslg2, 1, $searchnx3Pos[0], $searchnx3Pos[1], $searchnx3Pos[0]+$searchnx3Pos[2], $searchnx3Pos[1]+$searchnx3Pos[3], $bslg3x, $bslg3y, 96, 0) = 1 or _ImageSearchArea($bslg3, 1, $searchnx3Pos[0], $searchnx3Pos[1], $searchnx3Pos[0]+$searchnx3Pos[2], $searchnx3Pos[1]+$searchnx3Pos[3], $bslg3x, $bslg3y, 96, 0) = 1 or _ImageSearchArea($bslg4, 1, $searchnx3Pos[0], $searchnx3Pos[1], $searchnx3Pos[0]+$searchnx3Pos[2], $searchnx3Pos[1]+$searchnx3Pos[3], $bslg3x, $bslg3y, 96, 0) = 1 or _ImageSearchArea($bslg5, 1, $searchnx3Pos[0], $searchnx3Pos[1], $searchnx3Pos[0]+$searchnx3Pos[2], $searchnx3Pos[1]+$searchnx3Pos[3], $bslg3x, $bslg3y, 96, 0) = 1 Then
            ControlClick("nx(3)","", "", "left",1,138,17)
            Beep(500, 1000)
            Sleep (120000)
        EndIf
        If _ImageSearchArea($10RResults, 1, $searchnx3Pos[0], $searchnx3Pos[1], $searchnx3Pos[0]+$searchnx3Pos[2], $searchnx3Pos[1]+$searchnx3Pos[3], $10RResults3x, $10RResults3y, 96, 0) = 1 Then
            If Not FileExists (@ScriptDir & "\SS") Then
            DirCreate (@ScriptDir & "\SS")
            EndIf
            _ScreenCapture_CaptureWnd(@ScriptDir & "\SS" & "\10RResults_"& @YEAR & @MON & @MDAY & @HOUR & @MIN & @SEC & @MSEC & ".png", "nx(3)")
            Sleep (10000)
        EndIf
        If _ImageSearchArea($sgrre, 1, $searchnx3Pos[0], $searchnx3Pos[1], $searchnx3Pos[0]+$searchnx3Pos[2], $searchnx3Pos[1]+$searchnx3Pos[3], $sgrre3x, $sgrre3y, 48, 0) = 1 Then
            If Not FileExists (@ScriptDir & "\SS") Then
            DirCreate (@ScriptDir & "\SS")
            EndIf
            Sleep(925)
            _ScreenCapture_CaptureWnd(@ScriptDir & "\SS" & "\sgrre_"& @YEAR & @MON & @MDAY & @HOUR & @MIN & @SEC & @MSEC & ".png", "nx(3)")
            Sleep (5500)
        EndIf
        Sleep (333)
    Else
        Sleep (60000)
    EndIf
EndFunc

Func searchnx4()
    If WinExists("nx(4)") Then
        $searchnx4Pos = WinGetPos("nx(4)")
        If _ImageSearchArea($nm1, 1, $searchnx4Pos[0], $searchnx4Pos[1], $searchnx4Pos[0]+$searchnx4Pos[2], $searchnx4Pos[1]+$searchnx4Pos[3], $nm4x, $nm4y, 96, 0) = 1 or _ImageSearchArea($nm2, 1, $searchnx4Pos[0], $searchnx4Pos[1], $searchnx4Pos[0]+$searchnx4Pos[2], $searchnx4Pos[1]+$searchnx4Pos[3], $nm4x, $nm4y, 96, 0) = 1 or _ImageSearchArea($nm3, 1, $searchnx4Pos[0], $searchnx4Pos[1], $searchnx4Pos[0]+$searchnx4Pos[2], $searchnx4Pos[1]+$searchnx4Pos[3], $nm4x, $nm4y, 96, 0) = 1 or _ImageSearchArea($nm4, 1, $searchnx4Pos[0], $searchnx4Pos[1], $searchnx4Pos[0]+$searchnx4Pos[2], $searchnx4Pos[1]+$searchnx4Pos[3], $nm4x, $nm4y, 96, 0) = 1 or _ImageSearchArea($nm5, 1, $searchnx4Pos[0], $searchnx4Pos[1], $searchnx4Pos[0]+$searchnx4Pos[2], $searchnx4Pos[1]+$searchnx4Pos[3], $nm4x, $nm4y, 96, 0) = 1 or _ImageSearchArea($nm6, 1, $searchnx4Pos[0], $searchnx4Pos[1], $searchnx4Pos[0]+$searchnx4Pos[2], $searchnx4Pos[1]+$searchnx4Pos[3], $nm4x, $nm4y, 96, 0) = 1 or _ImageSearchArea($nm7, 1, $searchnx4Pos[0], $searchnx4Pos[1], $searchnx4Pos[0]+$searchnx4Pos[2], $searchnx4Pos[1]+$searchnx4Pos[3], $nm4x, $nm4y, 96, 0) = 1 or _ImageSearchArea($nm8, 1, $searchnx4Pos[0], $searchnx4Pos[1], $searchnx4Pos[0]+$searchnx4Pos[2], $searchnx4Pos[1]+$searchnx4Pos[3], $nm4x, $nm4y, 96, 0) = 1 or _ImageSearchArea($nm9, 1, $searchnx4Pos[0], $searchnx4Pos[1], $searchnx4Pos[0]+$searchnx4Pos[2], $searchnx4Pos[1]+$searchnx4Pos[3], $nm4x, $nm4y, 96, 0) = 1 or _ImageSearchArea($nm10, 1, $searchnx4Pos[0], $searchnx4Pos[1], $searchnx4Pos[0]+$searchnx4Pos[2], $searchnx4Pos[1]+$searchnx4Pos[3], $nm4x, $nm4y, 96, 0) = 1 Then
            If _ImageSearchArea($nx41, 1, $searchnx4Pos[0], $searchnx4Pos[1], $searchnx4Pos[0]+$searchnx4Pos[2], $searchnx4Pos[1]+$searchnx4Pos[3], $nx44x, $nx44y, 96, 0) = 1 or _ImageSearchArea($nx42, 1, $searchnx4Pos[0], $searchnx4Pos[1], $searchnx4Pos[0]+$searchnx4Pos[2], $searchnx4Pos[1]+$searchnx4Pos[3], $nx44x, $nx44y, 96, 0) = 1 or _ImageSearchArea($nx43, 1, $searchnx4Pos[0], $searchnx4Pos[1], $searchnx4Pos[0]+$searchnx4Pos[2], $searchnx4Pos[1]+$searchnx4Pos[3], $nx44x, $nx44y, 96, 0) = 1 or _ImageSearchArea($nx44, 1, $searchnx4Pos[0], $searchnx4Pos[1], $searchnx4Pos[0]+$searchnx4Pos[2], $searchnx4Pos[1]+$searchnx4Pos[3], $nx44x, $nx44y, 96, 0) = 1 or _ImageSearchArea($nx45, 1, $searchnx4Pos[0], $searchnx4Pos[1], $searchnx4Pos[0]+$searchnx4Pos[2], $searchnx4Pos[1]+$searchnx4Pos[3], $nx44x, $nx44y, 96, 0) = 1 or _ImageSearchArea($nx46, 1, $searchnx4Pos[0], $searchnx4Pos[1], $searchnx4Pos[0]+$searchnx4Pos[2], $searchnx4Pos[1]+$searchnx4Pos[3], $nx44x, $nx44y, 96, 0) = 1 or _ImageSearchArea($nx47, 1, $searchnx4Pos[0], $searchnx4Pos[1], $searchnx4Pos[0]+$searchnx4Pos[2], $searchnx4Pos[1]+$searchnx4Pos[3], $nx44x, $nx44y, 96, 0) = 1 or _ImageSearchArea($nx48, 1, $searchnx4Pos[0], $searchnx4Pos[1], $searchnx4Pos[0]+$searchnx4Pos[2], $searchnx4Pos[1]+$searchnx4Pos[3], $nx44x, $nx44y, 96, 0) = 1 or _ImageSearchArea($nx49, 1, $searchnx4Pos[0], $searchnx4Pos[1], $searchnx4Pos[0]+$searchnx4Pos[2], $searchnx4Pos[1]+$searchnx4Pos[3], $nx44x, $nx44y, 96, 0) = 1 or _ImageSearchArea($nx410, 1, $searchnx4Pos[0], $searchnx4Pos[1], $searchnx4Pos[0]+$searchnx4Pos[2], $searchnx4Pos[1]+$searchnx4Pos[3], $nx44x, $nx44y, 96, 0) = 1 Then
                ControlClick("nx(4)","", "", "left",1,138,17)
                Beep(500, 1000)
                Sleep (120000)
            EndIf
        EndIf
        If _ImageSearchArea($bslg1, 1, $searchnx4Pos[0], $searchnx4Pos[1], $searchnx4Pos[0]+$searchnx4Pos[2], $searchnx4Pos[1]+$searchnx4Pos[3], $bslg4x, $bslg4y, 96, 0) = 1 or _ImageSearchArea($bslg2, 1, $searchnx4Pos[0], $searchnx4Pos[1], $searchnx4Pos[0]+$searchnx4Pos[2], $searchnx4Pos[1]+$searchnx4Pos[3], $bslg4x, $bslg4y, 96, 0) = 1 or _ImageSearchArea($bslg3, 1, $searchnx4Pos[0], $searchnx4Pos[1], $searchnx4Pos[0]+$searchnx4Pos[2], $searchnx4Pos[1]+$searchnx4Pos[3], $bslg4x, $bslg4y, 96, 0) = 1 or _ImageSearchArea($bslg4, 1, $searchnx4Pos[0], $searchnx4Pos[1], $searchnx4Pos[0]+$searchnx4Pos[2], $searchnx4Pos[1]+$searchnx4Pos[3], $bslg4x, $bslg4y, 96, 0) = 1 or _ImageSearchArea($bslg5, 1, $searchnx4Pos[0], $searchnx4Pos[1], $searchnx4Pos[0]+$searchnx4Pos[2], $searchnx4Pos[1]+$searchnx4Pos[3], $bslg4x, $bslg4y, 96, 0) = 1 Then
            ControlClick("nx(4)","", "", "left",1,138,17)
            Beep(500, 1000)
            Sleep (120000)
        EndIf
        If _ImageSearchArea($10RResults, 1, $searchnx4Pos[0], $searchnx4Pos[1], $searchnx4Pos[0]+$searchnx4Pos[2], $searchnx4Pos[1]+$searchnx4Pos[3], $10RResults4x, $10RResults4y, 96, 0) = 1 Then
            If Not FileExists (@ScriptDir & "\SS") Then
            DirCreate (@ScriptDir & "\SS")
            EndIf
            _ScreenCapture_CaptureWnd(@ScriptDir & "\SS" & "\10RResults_"& @YEAR & @MON & @MDAY & @HOUR & @MIN & @SEC & @MSEC & ".png", "nx(4)")
            Sleep (10000)
        EndIf
        If _ImageSearchArea($sgrre, 1, $searchnx4Pos[0], $searchnx4Pos[1], $searchnx4Pos[0]+$searchnx4Pos[2], $searchnx4Pos[1]+$searchnx4Pos[3], $sgrre4x, $sgrre4y, 48, 0) = 1 Then
            If Not FileExists (@ScriptDir & "\SS") Then
            DirCreate (@ScriptDir & "\SS")
            EndIf
            Sleep(925)
            _ScreenCapture_CaptureWnd(@ScriptDir & "\SS" & "\sgrre_"& @YEAR & @MON & @MDAY & @HOUR & @MIN & @SEC & @MSEC & ".png", "nx(4)")
            Sleep (5500)
        EndIf
        Sleep (333)
    Else
        Sleep (60000)
    EndIf
EndFunc

Func searchnx5()
    If WinExists("nx(5)") Then
        $searchnx5Pos = WinGetPos("nx(5)")
        If _ImageSearchArea($nm1, 1, $searchnx5Pos[0], $searchnx5Pos[1], $searchnx5Pos[0]+$searchnx5Pos[2], $searchnx5Pos[1]+$searchnx5Pos[3], $nm5x, $nm5y, 96, 0) = 1 or _ImageSearchArea($nm2, 1, $searchnx5Pos[0], $searchnx5Pos[1], $searchnx5Pos[0]+$searchnx5Pos[2], $searchnx5Pos[1]+$searchnx5Pos[3], $nm5x, $nm5y, 96, 0) = 1 or _ImageSearchArea($nm3, 1, $searchnx5Pos[0], $searchnx5Pos[1], $searchnx5Pos[0]+$searchnx5Pos[2], $searchnx5Pos[1]+$searchnx5Pos[3], $nm5x, $nm5y, 96, 0) = 1 or _ImageSearchArea($nm4, 1, $searchnx5Pos[0], $searchnx5Pos[1], $searchnx5Pos[0]+$searchnx5Pos[2], $searchnx5Pos[1]+$searchnx5Pos[3], $nm5x, $nm5y, 96, 0) = 1 or _ImageSearchArea($nm5, 1, $searchnx5Pos[0], $searchnx5Pos[1], $searchnx5Pos[0]+$searchnx5Pos[2], $searchnx5Pos[1]+$searchnx5Pos[3], $nm5x, $nm5y, 96, 0) = 1 or _ImageSearchArea($nm6, 1, $searchnx5Pos[0], $searchnx5Pos[1], $searchnx5Pos[0]+$searchnx5Pos[2], $searchnx5Pos[1]+$searchnx5Pos[3], $nm5x, $nm5y, 96, 0) = 1 or _ImageSearchArea($nm7, 1, $searchnx5Pos[0], $searchnx5Pos[1], $searchnx5Pos[0]+$searchnx5Pos[2], $searchnx5Pos[1]+$searchnx5Pos[3], $nm5x, $nm5y, 96, 0) = 1 or _ImageSearchArea($nm8, 1, $searchnx5Pos[0], $searchnx5Pos[1], $searchnx5Pos[0]+$searchnx5Pos[2], $searchnx5Pos[1]+$searchnx5Pos[3], $nm5x, $nm5y, 96, 0) = 1 or _ImageSearchArea($nm9, 1, $searchnx5Pos[0], $searchnx5Pos[1], $searchnx5Pos[0]+$searchnx5Pos[2], $searchnx5Pos[1]+$searchnx5Pos[3], $nm5x, $nm5y, 96, 0) = 1 or _ImageSearchArea($nm10, 1, $searchnx5Pos[0], $searchnx5Pos[1], $searchnx5Pos[0]+$searchnx5Pos[2], $searchnx5Pos[1]+$searchnx5Pos[3], $nm5x, $nm5y, 96, 0) = 1 Then
            If _ImageSearchArea($nx41, 1, $searchnx5Pos[0], $searchnx5Pos[1], $searchnx5Pos[0]+$searchnx5Pos[2], $searchnx5Pos[1]+$searchnx5Pos[3], $nx45x, $nx45y, 96, 0) = 1 or _ImageSearchArea($nx42, 1, $searchnx5Pos[0], $searchnx5Pos[1], $searchnx5Pos[0]+$searchnx5Pos[2], $searchnx5Pos[1]+$searchnx5Pos[3], $nx45x, $nx45y, 96, 0) = 1 or _ImageSearchArea($nx43, 1, $searchnx5Pos[0], $searchnx5Pos[1], $searchnx5Pos[0]+$searchnx5Pos[2], $searchnx5Pos[1]+$searchnx5Pos[3], $nx45x, $nx45y, 96, 0) = 1 or _ImageSearchArea($nx44, 1, $searchnx5Pos[0], $searchnx5Pos[1], $searchnx5Pos[0]+$searchnx5Pos[2], $searchnx5Pos[1]+$searchnx5Pos[3], $nx45x, $nx45y, 96, 0) = 1 or _ImageSearchArea($nx45, 1, $searchnx5Pos[0], $searchnx5Pos[1], $searchnx5Pos[0]+$searchnx5Pos[2], $searchnx5Pos[1]+$searchnx5Pos[3], $nx45x, $nx45y, 96, 0) = 1 or _ImageSearchArea($nx46, 1, $searchnx5Pos[0], $searchnx5Pos[1], $searchnx5Pos[0]+$searchnx5Pos[2], $searchnx5Pos[1]+$searchnx5Pos[3], $nx45x, $nx45y, 96, 0) = 1 or _ImageSearchArea($nx47, 1, $searchnx5Pos[0], $searchnx5Pos[1], $searchnx5Pos[0]+$searchnx5Pos[2], $searchnx5Pos[1]+$searchnx5Pos[3], $nx45x, $nx45y, 96, 0) = 1 or _ImageSearchArea($nx48, 1, $searchnx5Pos[0], $searchnx5Pos[1], $searchnx5Pos[0]+$searchnx5Pos[2], $searchnx5Pos[1]+$searchnx5Pos[3], $nx45x, $nx45y, 96, 0) = 1 or _ImageSearchArea($nx49, 1, $searchnx5Pos[0], $searchnx5Pos[1], $searchnx5Pos[0]+$searchnx5Pos[2], $searchnx5Pos[1]+$searchnx5Pos[3], $nx45x, $nx45y, 96, 0) = 1 or _ImageSearchArea($nx410, 1, $searchnx5Pos[0], $searchnx5Pos[1], $searchnx5Pos[0]+$searchnx5Pos[2], $searchnx5Pos[1]+$searchnx5Pos[3], $nx45x, $nx45y, 96, 0) = 1 Then
                ControlClick("nx(5)","", "", "left",1,138,17)
                Beep(500, 1000)
                Sleep (120000)
            EndIf
        EndIf
        If _ImageSearchArea($bslg1, 1, $searchnx5Pos[0], $searchnx5Pos[1], $searchnx5Pos[0]+$searchnx5Pos[2], $searchnx5Pos[1]+$searchnx5Pos[3], $bslg5x, $bslg5y, 96, 0) = 1 or _ImageSearchArea($bslg2, 1, $searchnx5Pos[0], $searchnx5Pos[1], $searchnx5Pos[0]+$searchnx5Pos[2], $searchnx5Pos[1]+$searchnx5Pos[3], $bslg5x, $bslg5y, 96, 0) = 1 or _ImageSearchArea($bslg3, 1, $searchnx5Pos[0], $searchnx5Pos[1], $searchnx5Pos[0]+$searchnx5Pos[2], $searchnx5Pos[1]+$searchnx5Pos[3], $bslg5x, $bslg5y, 96, 0) = 1 or _ImageSearchArea($bslg4, 1, $searchnx5Pos[0], $searchnx5Pos[1], $searchnx5Pos[0]+$searchnx5Pos[2], $searchnx5Pos[1]+$searchnx5Pos[3], $bslg5x, $bslg5y, 96, 0) = 1 or _ImageSearchArea($bslg5, 1, $searchnx5Pos[0], $searchnx5Pos[1], $searchnx5Pos[0]+$searchnx5Pos[2], $searchnx5Pos[1]+$searchnx5Pos[3], $bslg5x, $bslg5y, 96, 0) = 1 Then
            ControlClick("nx(5)","", "", "left",1,138,17)
            Beep(500, 1000)
            Sleep (120000)
        EndIf
        If _ImageSearchArea($10RResults, 1, $searchnx5Pos[0], $searchnx5Pos[1], $searchnx5Pos[0]+$searchnx5Pos[2], $searchnx5Pos[1]+$searchnx5Pos[3], $10RResults5x, $10RResults5y, 96, 0) = 1 Then
            If Not FileExists (@ScriptDir & "\SS") Then
            DirCreate (@ScriptDir & "\SS")
            EndIf
            _ScreenCapture_CaptureWnd(@ScriptDir & "\SS" & "\10RResults_"& @YEAR & @MON & @MDAY & @HOUR & @MIN & @SEC & @MSEC & ".png", "nx(5)")
            Sleep (10000)
        EndIf
        If _ImageSearchArea($sgrre, 1, $searchnx5Pos[0], $searchnx5Pos[1], $searchnx5Pos[0]+$searchnx5Pos[2], $searchnx5Pos[1]+$searchnx5Pos[3], $sgrre5x, $sgrre5y, 48, 0) = 1 Then
            If Not FileExists (@ScriptDir & "\SS") Then
            DirCreate (@ScriptDir & "\SS")
            EndIf
            Sleep(925)
            _ScreenCapture_CaptureWnd(@ScriptDir & "\SS" & "\sgrre_"& @YEAR & @MON & @MDAY & @HOUR & @MIN & @SEC & @MSEC & ".png", "nx(5)")
            Sleep (5500)
        EndIf
        Sleep (333)
    Else
        Sleep (60000)
    EndIf
EndFunc

Func searchnx6()
    If WinExists("nx(6)") Then
        $searchnx6Pos = WinGetPos("nx(6)")
        If _ImageSearchArea($nm1, 1, $searchnx6Pos[0], $searchnx6Pos[1], $searchnx6Pos[0]+$searchnx6Pos[2], $searchnx6Pos[1]+$searchnx6Pos[3], $nm6x, $nm6y, 96, 0) = 1 or _ImageSearchArea($nm2, 1, $searchnx6Pos[0], $searchnx6Pos[1], $searchnx6Pos[0]+$searchnx6Pos[2], $searchnx6Pos[1]+$searchnx6Pos[3], $nm6x, $nm6y, 96, 0) = 1 or _ImageSearchArea($nm3, 1, $searchnx6Pos[0], $searchnx6Pos[1], $searchnx6Pos[0]+$searchnx6Pos[2], $searchnx6Pos[1]+$searchnx6Pos[3], $nm6x, $nm6y, 96, 0) = 1 or _ImageSearchArea($nm4, 1, $searchnx6Pos[0], $searchnx6Pos[1], $searchnx6Pos[0]+$searchnx6Pos[2], $searchnx6Pos[1]+$searchnx6Pos[3], $nm6x, $nm6y, 96, 0) = 1 or _ImageSearchArea($nm5, 1, $searchnx6Pos[0], $searchnx6Pos[1], $searchnx6Pos[0]+$searchnx6Pos[2], $searchnx6Pos[1]+$searchnx6Pos[3], $nm6x, $nm6y, 96, 0) = 1 or _ImageSearchArea($nm6, 1, $searchnx6Pos[0], $searchnx6Pos[1], $searchnx6Pos[0]+$searchnx6Pos[2], $searchnx6Pos[1]+$searchnx6Pos[3], $nm6x, $nm6y, 96, 0) = 1 or _ImageSearchArea($nm7, 1, $searchnx6Pos[0], $searchnx6Pos[1], $searchnx6Pos[0]+$searchnx6Pos[2], $searchnx6Pos[1]+$searchnx6Pos[3], $nm6x, $nm6y, 96, 0) = 1 or _ImageSearchArea($nm8, 1, $searchnx6Pos[0], $searchnx6Pos[1], $searchnx6Pos[0]+$searchnx6Pos[2], $searchnx6Pos[1]+$searchnx6Pos[3], $nm6x, $nm6y, 96, 0) = 1 or _ImageSearchArea($nm9, 1, $searchnx6Pos[0], $searchnx6Pos[1], $searchnx6Pos[0]+$searchnx6Pos[2], $searchnx6Pos[1]+$searchnx6Pos[3], $nm6x, $nm6y, 96, 0) = 1 or _ImageSearchArea($nm10, 1, $searchnx6Pos[0], $searchnx6Pos[1], $searchnx6Pos[0]+$searchnx6Pos[2], $searchnx6Pos[1]+$searchnx6Pos[3], $nm6x, $nm6y, 96, 0) = 1 Then
            If _ImageSearchArea($nx41, 1, $searchnx6Pos[0], $searchnx6Pos[1], $searchnx6Pos[0]+$searchnx6Pos[2], $searchnx6Pos[1]+$searchnx6Pos[3], $nx46x, $nx46y, 96, 0) = 1 or _ImageSearchArea($nx42, 1, $searchnx6Pos[0], $searchnx6Pos[1], $searchnx6Pos[0]+$searchnx6Pos[2], $searchnx6Pos[1]+$searchnx6Pos[3], $nx46x, $nx46y, 96, 0) = 1 or _ImageSearchArea($nx43, 1, $searchnx6Pos[0], $searchnx6Pos[1], $searchnx6Pos[0]+$searchnx6Pos[2], $searchnx6Pos[1]+$searchnx6Pos[3], $nx46x, $nx46y, 96, 0) = 1 or _ImageSearchArea($nx44, 1, $searchnx6Pos[0], $searchnx6Pos[1], $searchnx6Pos[0]+$searchnx6Pos[2], $searchnx6Pos[1]+$searchnx6Pos[3], $nx46x, $nx46y, 96, 0) = 1 or _ImageSearchArea($nx45, 1, $searchnx6Pos[0], $searchnx6Pos[1], $searchnx6Pos[0]+$searchnx6Pos[2], $searchnx6Pos[1]+$searchnx6Pos[3], $nx46x, $nx46y, 96, 0) = 1 or _ImageSearchArea($nx46, 1, $searchnx6Pos[0], $searchnx6Pos[1], $searchnx6Pos[0]+$searchnx6Pos[2], $searchnx6Pos[1]+$searchnx6Pos[3], $nx46x, $nx46y, 96, 0) = 1 or _ImageSearchArea($nx47, 1, $searchnx6Pos[0], $searchnx6Pos[1], $searchnx6Pos[0]+$searchnx6Pos[2], $searchnx6Pos[1]+$searchnx6Pos[3], $nx46x, $nx46y, 96, 0) = 1 or _ImageSearchArea($nx48, 1, $searchnx6Pos[0], $searchnx6Pos[1], $searchnx6Pos[0]+$searchnx6Pos[2], $searchnx6Pos[1]+$searchnx6Pos[3], $nx46x, $nx46y, 96, 0) = 1 or _ImageSearchArea($nx49, 1, $searchnx6Pos[0], $searchnx6Pos[1], $searchnx6Pos[0]+$searchnx6Pos[2], $searchnx6Pos[1]+$searchnx6Pos[3], $nx46x, $nx46y, 96, 0) = 1 or _ImageSearchArea($nx410, 1, $searchnx6Pos[0], $searchnx6Pos[1], $searchnx6Pos[0]+$searchnx6Pos[2], $searchnx6Pos[1]+$searchnx6Pos[3], $nx46x, $nx46y, 96, 0) = 1 Then
                ControlClick("nx(6)","", "", "left",1,138,17)
                Beep(500, 1000)
                Sleep (120000)
            EndIf
        EndIf
        If _ImageSearchArea($bslg1, 1, $searchnx6Pos[0], $searchnx6Pos[1], $searchnx6Pos[0]+$searchnx6Pos[2], $searchnx6Pos[1]+$searchnx6Pos[3], $bslg6x, $bslg6y, 96, 0) = 1 or _ImageSearchArea($bslg2, 1, $searchnx6Pos[0], $searchnx6Pos[1], $searchnx6Pos[0]+$searchnx6Pos[2], $searchnx6Pos[1]+$searchnx6Pos[3], $bslg6x, $bslg6y, 96, 0) = 1 or _ImageSearchArea($bslg3, 1, $searchnx6Pos[0], $searchnx6Pos[1], $searchnx6Pos[0]+$searchnx6Pos[2], $searchnx6Pos[1]+$searchnx6Pos[3], $bslg6x, $bslg6y, 96, 0) = 1 or _ImageSearchArea($bslg4, 1, $searchnx6Pos[0], $searchnx6Pos[1], $searchnx6Pos[0]+$searchnx6Pos[2], $searchnx6Pos[1]+$searchnx6Pos[3], $bslg6x, $bslg6y, 96, 0) = 1 or _ImageSearchArea($bslg5, 1, $searchnx6Pos[0], $searchnx6Pos[1], $searchnx6Pos[0]+$searchnx6Pos[2], $searchnx6Pos[1]+$searchnx6Pos[3], $bslg6x, $bslg6y, 96, 0) = 1 Then
            ControlClick("nx(6)","", "", "left",1,138,17)
            Beep(500, 1000)
            Sleep (120000)
        EndIf
        If _ImageSearchArea($10RResults, 1, $searchnx6Pos[0], $searchnx6Pos[1], $searchnx6Pos[0]+$searchnx6Pos[2], $searchnx6Pos[1]+$searchnx6Pos[3], $10RResults6x, $10RResults6y, 96, 0) = 1 Then
            If Not FileExists (@ScriptDir & "\SS") Then
            DirCreate (@ScriptDir & "\SS")
            EndIf
            _ScreenCapture_CaptureWnd(@ScriptDir & "\SS" & "\10RResults_"& @YEAR & @MON & @MDAY & @HOUR & @MIN & @SEC & @MSEC & ".png", "nx(6)")
            Sleep (10000)
        EndIf
        If _ImageSearchArea($sgrre, 1, $searchnx6Pos[0], $searchnx6Pos[1], $searchnx6Pos[0]+$searchnx6Pos[2], $searchnx6Pos[1]+$searchnx6Pos[3], $sgrre6x, $sgrre6y, 48, 0) = 1 Then
            If Not FileExists (@ScriptDir & "\SS") Then
            DirCreate (@ScriptDir & "\SS")
            EndIf
            Sleep(925)
            _ScreenCapture_CaptureWnd(@ScriptDir & "\SS" & "\sgrre_"& @YEAR & @MON & @MDAY & @HOUR & @MIN & @SEC & @MSEC & ".png", "nx(6)")
            Sleep (5500)
        EndIf
        Sleep (333)
    Else
        Sleep (60000)
    EndIf
EndFunc

Func searchnx7()
    If WinExists("nx(7)") Then
        $searchnx7Pos = WinGetPos("nx(7)")
        If _ImageSearchArea($nm1, 1, $searchnx7Pos[0], $searchnx7Pos[1], $searchnx7Pos[0]+$searchnx7Pos[2], $searchnx7Pos[1]+$searchnx7Pos[3], $nm7x, $nm7y, 96, 0) = 1 or _ImageSearchArea($nm2, 1, $searchnx7Pos[0], $searchnx7Pos[1], $searchnx7Pos[0]+$searchnx7Pos[2], $searchnx7Pos[1]+$searchnx7Pos[3], $nm7x, $nm7y, 96, 0) = 1 or _ImageSearchArea($nm3, 1, $searchnx7Pos[0], $searchnx7Pos[1], $searchnx7Pos[0]+$searchnx7Pos[2], $searchnx7Pos[1]+$searchnx7Pos[3], $nm7x, $nm7y, 96, 0) = 1 or _ImageSearchArea($nm4, 1, $searchnx7Pos[0], $searchnx7Pos[1], $searchnx7Pos[0]+$searchnx7Pos[2], $searchnx7Pos[1]+$searchnx7Pos[3], $nm7x, $nm7y, 96, 0) = 1 or _ImageSearchArea($nm5, 1, $searchnx7Pos[0], $searchnx7Pos[1], $searchnx7Pos[0]+$searchnx7Pos[2], $searchnx7Pos[1]+$searchnx7Pos[3], $nm7x, $nm7y, 96, 0) = 1 or _ImageSearchArea($nm6, 1, $searchnx7Pos[0], $searchnx7Pos[1], $searchnx7Pos[0]+$searchnx7Pos[2], $searchnx7Pos[1]+$searchnx7Pos[3], $nm7x, $nm7y, 96, 0) = 1 or _ImageSearchArea($nm7, 1, $searchnx7Pos[0], $searchnx7Pos[1], $searchnx7Pos[0]+$searchnx7Pos[2], $searchnx7Pos[1]+$searchnx7Pos[3], $nm7x, $nm7y, 96, 0) = 1 or _ImageSearchArea($nm8, 1, $searchnx7Pos[0], $searchnx7Pos[1], $searchnx7Pos[0]+$searchnx7Pos[2], $searchnx7Pos[1]+$searchnx7Pos[3], $nm7x, $nm7y, 96, 0) = 1 or _ImageSearchArea($nm9, 1, $searchnx7Pos[0], $searchnx7Pos[1], $searchnx7Pos[0]+$searchnx7Pos[2], $searchnx7Pos[1]+$searchnx7Pos[3], $nm7x, $nm7y, 96, 0) = 1 or _ImageSearchArea($nm10, 1, $searchnx7Pos[0], $searchnx7Pos[1], $searchnx7Pos[0]+$searchnx7Pos[2], $searchnx7Pos[1]+$searchnx7Pos[3], $nm7x, $nm7y, 96, 0) = 1 Then
            If _ImageSearchArea($nx41, 1, $searchnx7Pos[0], $searchnx7Pos[1], $searchnx7Pos[0]+$searchnx7Pos[2], $searchnx7Pos[1]+$searchnx7Pos[3], $nx47x, $nx47y, 96, 0) = 1 or _ImageSearchArea($nx42, 1, $searchnx7Pos[0], $searchnx7Pos[1], $searchnx7Pos[0]+$searchnx7Pos[2], $searchnx7Pos[1]+$searchnx7Pos[3], $nx47x, $nx47y, 96, 0) = 1 or _ImageSearchArea($nx43, 1, $searchnx7Pos[0], $searchnx7Pos[1], $searchnx7Pos[0]+$searchnx7Pos[2], $searchnx7Pos[1]+$searchnx7Pos[3], $nx47x, $nx47y, 96, 0) = 1 or _ImageSearchArea($nx44, 1, $searchnx7Pos[0], $searchnx7Pos[1], $searchnx7Pos[0]+$searchnx7Pos[2], $searchnx7Pos[1]+$searchnx7Pos[3], $nx47x, $nx47y, 96, 0) = 1 or _ImageSearchArea($nx45, 1, $searchnx7Pos[0], $searchnx7Pos[1], $searchnx7Pos[0]+$searchnx7Pos[2], $searchnx7Pos[1]+$searchnx7Pos[3], $nx47x, $nx47y, 96, 0) = 1 or _ImageSearchArea($nx46, 1, $searchnx7Pos[0], $searchnx7Pos[1], $searchnx7Pos[0]+$searchnx7Pos[2], $searchnx7Pos[1]+$searchnx7Pos[3], $nx47x, $nx47y, 96, 0) = 1 or _ImageSearchArea($nx47, 1, $searchnx7Pos[0], $searchnx7Pos[1], $searchnx7Pos[0]+$searchnx7Pos[2], $searchnx7Pos[1]+$searchnx7Pos[3], $nx47x, $nx47y, 96, 0) = 1 or _ImageSearchArea($nx48, 1, $searchnx7Pos[0], $searchnx7Pos[1], $searchnx7Pos[0]+$searchnx7Pos[2], $searchnx7Pos[1]+$searchnx7Pos[3], $nx47x, $nx47y, 96, 0) = 1 or _ImageSearchArea($nx49, 1, $searchnx7Pos[0], $searchnx7Pos[1], $searchnx7Pos[0]+$searchnx7Pos[2], $searchnx7Pos[1]+$searchnx7Pos[3], $nx47x, $nx47y, 96, 0) = 1 or _ImageSearchArea($nx410, 1, $searchnx7Pos[0], $searchnx7Pos[1], $searchnx7Pos[0]+$searchnx7Pos[2], $searchnx7Pos[1]+$searchnx7Pos[3], $nx47x, $nx47y, 96, 0) = 1 Then
                ControlClick("nx(7)","", "", "left",1,138,17)
                Beep(500, 1000)
                Sleep (120000)
            EndIf
        EndIf
        If _ImageSearchArea($bslg1, 1, $searchnx7Pos[0], $searchnx7Pos[1], $searchnx7Pos[0]+$searchnx7Pos[2], $searchnx7Pos[1]+$searchnx7Pos[3], $bslg7x, $bslg7y, 96, 0) = 1 or _ImageSearchArea($bslg2, 1, $searchnx7Pos[0], $searchnx7Pos[1], $searchnx7Pos[0]+$searchnx7Pos[2], $searchnx7Pos[1]+$searchnx7Pos[3], $bslg7x, $bslg7y, 96, 0) = 1 or _ImageSearchArea($bslg3, 1, $searchnx7Pos[0], $searchnx7Pos[1], $searchnx7Pos[0]+$searchnx7Pos[2], $searchnx7Pos[1]+$searchnx7Pos[3], $bslg7x, $bslg7y, 96, 0) = 1 or _ImageSearchArea($bslg4, 1, $searchnx7Pos[0], $searchnx7Pos[1], $searchnx7Pos[0]+$searchnx7Pos[2], $searchnx7Pos[1]+$searchnx7Pos[3], $bslg7x, $bslg7y, 96, 0) = 1 or _ImageSearchArea($bslg5, 1, $searchnx7Pos[0], $searchnx7Pos[1], $searchnx7Pos[0]+$searchnx7Pos[2], $searchnx7Pos[1]+$searchnx7Pos[3], $bslg7x, $bslg7y, 96, 0) = 1 Then
            ControlClick("nx(7)","", "", "left",1,138,17)
            Beep(500, 1000)
            Sleep (120000)
        EndIf
        If _ImageSearchArea($10RResults, 1, $searchnx7Pos[0], $searchnx7Pos[1], $searchnx7Pos[0]+$searchnx7Pos[2], $searchnx7Pos[1]+$searchnx7Pos[3], $10RResults7x, $10RResults7y, 96, 0) = 1 Then
            If Not FileExists (@ScriptDir & "\SS") Then
            DirCreate (@ScriptDir & "\SS")
            EndIf
            _ScreenCapture_CaptureWnd(@ScriptDir & "\SS" & "\10RResults_"& @YEAR & @MON & @MDAY & @HOUR & @MIN & @SEC & @MSEC & ".png", "nx(7)")
            Sleep (10000)
        EndIf
        If _ImageSearchArea($sgrre, 1, $searchnx7Pos[0], $searchnx7Pos[1], $searchnx7Pos[0]+$searchnx7Pos[2], $searchnx7Pos[1]+$searchnx7Pos[3], $sgrre7x, $sgrre7y, 48, 0) = 1 Then
            If Not FileExists (@ScriptDir & "\SS") Then
            DirCreate (@ScriptDir & "\SS")
            EndIf
            Sleep(925)
            _ScreenCapture_CaptureWnd(@ScriptDir & "\SS" & "\sgrre_"& @YEAR & @MON & @MDAY & @HOUR & @MIN & @SEC & @MSEC & ".png", "nx(7)")
            Sleep (5500)
        EndIf
        Sleep (333)
    Else
        Sleep (60000)
    EndIf
EndFunc

Func searchnx8()
    If WinExists("nx(8)") Then
        $searchnx8Pos = WinGetPos("nx(8)")
        If _ImageSearchArea($nm1, 1, $searchnx8Pos[0], $searchnx8Pos[1], $searchnx8Pos[0]+$searchnx8Pos[2], $searchnx8Pos[1]+$searchnx8Pos[3], $nm8x, $nm8y, 96, 0) = 1 or _ImageSearchArea($nm2, 1, $searchnx8Pos[0], $searchnx8Pos[1], $searchnx8Pos[0]+$searchnx8Pos[2], $searchnx8Pos[1]+$searchnx8Pos[3], $nm8x, $nm8y, 96, 0) = 1 or _ImageSearchArea($nm3, 1, $searchnx8Pos[0], $searchnx8Pos[1], $searchnx8Pos[0]+$searchnx8Pos[2], $searchnx8Pos[1]+$searchnx8Pos[3], $nm8x, $nm8y, 96, 0) = 1 or _ImageSearchArea($nm4, 1, $searchnx8Pos[0], $searchnx8Pos[1], $searchnx8Pos[0]+$searchnx8Pos[2], $searchnx8Pos[1]+$searchnx8Pos[3], $nm8x, $nm8y, 96, 0) = 1 or _ImageSearchArea($nm5, 1, $searchnx8Pos[0], $searchnx8Pos[1], $searchnx8Pos[0]+$searchnx8Pos[2], $searchnx8Pos[1]+$searchnx8Pos[3], $nm8x, $nm8y, 96, 0) = 1 or _ImageSearchArea($nm6, 1, $searchnx8Pos[0], $searchnx8Pos[1], $searchnx8Pos[0]+$searchnx8Pos[2], $searchnx8Pos[1]+$searchnx8Pos[3], $nm8x, $nm8y, 96, 0) = 1 or _ImageSearchArea($nm7, 1, $searchnx8Pos[0], $searchnx8Pos[1], $searchnx8Pos[0]+$searchnx8Pos[2], $searchnx8Pos[1]+$searchnx8Pos[3], $nm8x, $nm8y, 96, 0) = 1 or _ImageSearchArea($nm8, 1, $searchnx8Pos[0], $searchnx8Pos[1], $searchnx8Pos[0]+$searchnx8Pos[2], $searchnx8Pos[1]+$searchnx8Pos[3], $nm8x, $nm8y, 96, 0) = 1 or _ImageSearchArea($nm9, 1, $searchnx8Pos[0], $searchnx8Pos[1], $searchnx8Pos[0]+$searchnx8Pos[2], $searchnx8Pos[1]+$searchnx8Pos[3], $nm8x, $nm8y, 96, 0) = 1 or _ImageSearchArea($nm10, 1, $searchnx8Pos[0], $searchnx8Pos[1], $searchnx8Pos[0]+$searchnx8Pos[2], $searchnx8Pos[1]+$searchnx8Pos[3], $nm8x, $nm8y, 96, 0) = 1 Then
            If _ImageSearchArea($nx41, 1, $searchnx8Pos[0], $searchnx8Pos[1], $searchnx8Pos[0]+$searchnx8Pos[2], $searchnx8Pos[1]+$searchnx8Pos[3], $nx48x, $nx48y, 96, 0) = 1 or _ImageSearchArea($nx42, 1, $searchnx8Pos[0], $searchnx8Pos[1], $searchnx8Pos[0]+$searchnx8Pos[2], $searchnx8Pos[1]+$searchnx8Pos[3], $nx48x, $nx48y, 96, 0) = 1 or _ImageSearchArea($nx43, 1, $searchnx8Pos[0], $searchnx8Pos[1], $searchnx8Pos[0]+$searchnx8Pos[2], $searchnx8Pos[1]+$searchnx8Pos[3], $nx48x, $nx48y, 96, 0) = 1 or _ImageSearchArea($nx44, 1, $searchnx8Pos[0], $searchnx8Pos[1], $searchnx8Pos[0]+$searchnx8Pos[2], $searchnx8Pos[1]+$searchnx8Pos[3], $nx48x, $nx48y, 96, 0) = 1 or _ImageSearchArea($nx45, 1, $searchnx8Pos[0], $searchnx8Pos[1], $searchnx8Pos[0]+$searchnx8Pos[2], $searchnx8Pos[1]+$searchnx8Pos[3], $nx48x, $nx48y, 96, 0) = 1 or _ImageSearchArea($nx46, 1, $searchnx8Pos[0], $searchnx8Pos[1], $searchnx8Pos[0]+$searchnx8Pos[2], $searchnx8Pos[1]+$searchnx8Pos[3], $nx48x, $nx48y, 96, 0) = 1 or _ImageSearchArea($nx47, 1, $searchnx8Pos[0], $searchnx8Pos[1], $searchnx8Pos[0]+$searchnx8Pos[2], $searchnx8Pos[1]+$searchnx8Pos[3], $nx48x, $nx48y, 96, 0) = 1 or _ImageSearchArea($nx48, 1, $searchnx8Pos[0], $searchnx8Pos[1], $searchnx8Pos[0]+$searchnx8Pos[2], $searchnx8Pos[1]+$searchnx8Pos[3], $nx48x, $nx48y, 96, 0) = 1 or _ImageSearchArea($nx49, 1, $searchnx8Pos[0], $searchnx8Pos[1], $searchnx8Pos[0]+$searchnx8Pos[2], $searchnx8Pos[1]+$searchnx8Pos[3], $nx48x, $nx48y, 96, 0) = 1 or _ImageSearchArea($nx410, 1, $searchnx8Pos[0], $searchnx8Pos[1], $searchnx8Pos[0]+$searchnx8Pos[2], $searchnx8Pos[1]+$searchnx8Pos[3], $nx48x, $nx48y, 96, 0) = 1 Then
                ControlClick("nx(8)","", "", "left",1,138,17)
                Beep(500, 1000)
                Sleep (120000)
            EndIf
        EndIf
        If _ImageSearchArea($bslg1, 1, $searchnx8Pos[0], $searchnx8Pos[1], $searchnx8Pos[0]+$searchnx8Pos[2], $searchnx8Pos[1]+$searchnx8Pos[3], $bslg8x, $bslg8y, 96, 0) = 1 or _ImageSearchArea($bslg2, 1, $searchnx8Pos[0], $searchnx8Pos[1], $searchnx8Pos[0]+$searchnx8Pos[2], $searchnx8Pos[1]+$searchnx8Pos[3], $bslg8x, $bslg8y, 96, 0) = 1 or _ImageSearchArea($bslg3, 1, $searchnx8Pos[0], $searchnx8Pos[1], $searchnx8Pos[0]+$searchnx8Pos[2], $searchnx8Pos[1]+$searchnx8Pos[3], $bslg8x, $bslg8y, 96, 0) = 1 or _ImageSearchArea($bslg4, 1, $searchnx8Pos[0], $searchnx8Pos[1], $searchnx8Pos[0]+$searchnx8Pos[2], $searchnx8Pos[1]+$searchnx8Pos[3], $bslg8x, $bslg8y, 96, 0) = 1 or _ImageSearchArea($bslg5, 1, $searchnx8Pos[0], $searchnx8Pos[1], $searchnx8Pos[0]+$searchnx8Pos[2], $searchnx8Pos[1]+$searchnx8Pos[3], $bslg8x, $bslg8y, 96, 0) = 1 Then
            ControlClick("nx(8)","", "", "left",1,138,17)
            Beep(500, 1000)
            Sleep (120000)
        EndIf
        If _ImageSearchArea($10RResults, 1, $searchnx8Pos[0], $searchnx8Pos[1], $searchnx8Pos[0]+$searchnx8Pos[2], $searchnx8Pos[1]+$searchnx8Pos[3], $10RResults8x, $10RResults8y, 96, 0) = 1 Then
            If Not FileExists (@ScriptDir & "\SS") Then
            DirCreate (@ScriptDir & "\SS")
            EndIf
            _ScreenCapture_CaptureWnd(@ScriptDir & "\SS" & "\10RResults_"& @YEAR & @MON & @MDAY & @HOUR & @MIN & @SEC & @MSEC & ".png", "nx(8)")
            Sleep (10000)
        EndIf
        If _ImageSearchArea($sgrre, 1, $searchnx8Pos[0], $searchnx8Pos[1], $searchnx8Pos[0]+$searchnx8Pos[2], $searchnx8Pos[1]+$searchnx8Pos[3], $sgrre8x, $sgrre8y, 48, 0) = 1 Then
            If Not FileExists (@ScriptDir & "\SS") Then
            DirCreate (@ScriptDir & "\SS")
            EndIf
            Sleep(925)
            _ScreenCapture_CaptureWnd(@ScriptDir & "\SS" & "\sgrre_"& @YEAR & @MON & @MDAY & @HOUR & @MIN & @SEC & @MSEC & ".png", "nx(8)")
            Sleep (5500)
        EndIf
        Sleep (333)
    Else
        Sleep (60000)
    EndIf
EndFunc

Func searchnx9()
    If WinExists("nx(9)") Then
        $searchnx9Pos = WinGetPos("nx(9)")
        If _ImageSearchArea($nm1, 1, $searchnx9Pos[0], $searchnx9Pos[1], $searchnx9Pos[0]+$searchnx9Pos[2], $searchnx9Pos[1]+$searchnx9Pos[3], $nm9x, $nm9y, 96, 0) = 1 or _ImageSearchArea($nm2, 1, $searchnx9Pos[0], $searchnx9Pos[1], $searchnx9Pos[0]+$searchnx9Pos[2], $searchnx9Pos[1]+$searchnx9Pos[3], $nm9x, $nm9y, 96, 0) = 1 or _ImageSearchArea($nm3, 1, $searchnx9Pos[0], $searchnx9Pos[1], $searchnx9Pos[0]+$searchnx9Pos[2], $searchnx9Pos[1]+$searchnx9Pos[3], $nm9x, $nm9y, 96, 0) = 1 or _ImageSearchArea($nm4, 1, $searchnx9Pos[0], $searchnx9Pos[1], $searchnx9Pos[0]+$searchnx9Pos[2], $searchnx9Pos[1]+$searchnx9Pos[3], $nm9x, $nm9y, 96, 0) = 1 or _ImageSearchArea($nm5, 1, $searchnx9Pos[0], $searchnx9Pos[1], $searchnx9Pos[0]+$searchnx9Pos[2], $searchnx9Pos[1]+$searchnx9Pos[3], $nm9x, $nm9y, 96, 0) = 1 or _ImageSearchArea($nm6, 1, $searchnx9Pos[0], $searchnx9Pos[1], $searchnx9Pos[0]+$searchnx9Pos[2], $searchnx9Pos[1]+$searchnx9Pos[3], $nm9x, $nm9y, 96, 0) = 1 or _ImageSearchArea($nm7, 1, $searchnx9Pos[0], $searchnx9Pos[1], $searchnx9Pos[0]+$searchnx9Pos[2], $searchnx9Pos[1]+$searchnx9Pos[3], $nm9x, $nm9y, 96, 0) = 1 or _ImageSearchArea($nm8, 1, $searchnx9Pos[0], $searchnx9Pos[1], $searchnx9Pos[0]+$searchnx9Pos[2], $searchnx9Pos[1]+$searchnx9Pos[3], $nm9x, $nm9y, 96, 0) = 1 or _ImageSearchArea($nm9, 1, $searchnx9Pos[0], $searchnx9Pos[1], $searchnx9Pos[0]+$searchnx9Pos[2], $searchnx9Pos[1]+$searchnx9Pos[3], $nm9x, $nm9y, 96, 0) = 1 or _ImageSearchArea($nm10, 1, $searchnx9Pos[0], $searchnx9Pos[1], $searchnx9Pos[0]+$searchnx9Pos[2], $searchnx9Pos[1]+$searchnx9Pos[3], $nm9x, $nm9y, 96, 0) = 1 Then
            If _ImageSearchArea($nx41, 1, $searchnx9Pos[0], $searchnx9Pos[1], $searchnx9Pos[0]+$searchnx9Pos[2], $searchnx9Pos[1]+$searchnx9Pos[3], $nx49x, $nx49y, 96, 0) = 1 or _ImageSearchArea($nx42, 1, $searchnx9Pos[0], $searchnx9Pos[1], $searchnx9Pos[0]+$searchnx9Pos[2], $searchnx9Pos[1]+$searchnx9Pos[3], $nx49x, $nx49y, 96, 0) = 1 or _ImageSearchArea($nx43, 1, $searchnx9Pos[0], $searchnx9Pos[1], $searchnx9Pos[0]+$searchnx9Pos[2], $searchnx9Pos[1]+$searchnx9Pos[3], $nx49x, $nx49y, 96, 0) = 1 or _ImageSearchArea($nx44, 1, $searchnx9Pos[0], $searchnx9Pos[1], $searchnx9Pos[0]+$searchnx9Pos[2], $searchnx9Pos[1]+$searchnx9Pos[3], $nx49x, $nx49y, 96, 0) = 1 or _ImageSearchArea($nx45, 1, $searchnx9Pos[0], $searchnx9Pos[1], $searchnx9Pos[0]+$searchnx9Pos[2], $searchnx9Pos[1]+$searchnx9Pos[3], $nx49x, $nx49y, 96, 0) = 1 or _ImageSearchArea($nx46, 1, $searchnx9Pos[0], $searchnx9Pos[1], $searchnx9Pos[0]+$searchnx9Pos[2], $searchnx9Pos[1]+$searchnx9Pos[3], $nx49x, $nx49y, 96, 0) = 1 or _ImageSearchArea($nx47, 1, $searchnx9Pos[0], $searchnx9Pos[1], $searchnx9Pos[0]+$searchnx9Pos[2], $searchnx9Pos[1]+$searchnx9Pos[3], $nx49x, $nx49y, 96, 0) = 1 or _ImageSearchArea($nx48, 1, $searchnx9Pos[0], $searchnx9Pos[1], $searchnx9Pos[0]+$searchnx9Pos[2], $searchnx9Pos[1]+$searchnx9Pos[3], $nx49x, $nx49y, 96, 0) = 1 or _ImageSearchArea($nx49, 1, $searchnx9Pos[0], $searchnx9Pos[1], $searchnx9Pos[0]+$searchnx9Pos[2], $searchnx9Pos[1]+$searchnx9Pos[3], $nx49x, $nx49y, 96, 0) = 1 or _ImageSearchArea($nx410, 1, $searchnx9Pos[0], $searchnx9Pos[1], $searchnx9Pos[0]+$searchnx9Pos[2], $searchnx9Pos[1]+$searchnx9Pos[3], $nx49x, $nx49y, 96, 0) = 1 Then
                ControlClick("nx(9)","", "", "left",1,138,17)
                Beep(500, 1000)
                Sleep (120000)
            EndIf
        EndIf
        If _ImageSearchArea($bslg1, 1, $searchnx9Pos[0], $searchnx9Pos[1], $searchnx9Pos[0]+$searchnx9Pos[2], $searchnx9Pos[1]+$searchnx9Pos[3], $bslg9x, $bslg9y, 96, 0) = 1 or _ImageSearchArea($bslg2, 1, $searchnx9Pos[0], $searchnx9Pos[1], $searchnx9Pos[0]+$searchnx9Pos[2], $searchnx9Pos[1]+$searchnx9Pos[3], $bslg9x, $bslg9y, 96, 0) = 1 or _ImageSearchArea($bslg3, 1, $searchnx9Pos[0], $searchnx9Pos[1], $searchnx9Pos[0]+$searchnx9Pos[2], $searchnx9Pos[1]+$searchnx9Pos[3], $bslg9x, $bslg9y, 96, 0) = 1 or _ImageSearchArea($bslg4, 1, $searchnx9Pos[0], $searchnx9Pos[1], $searchnx9Pos[0]+$searchnx9Pos[2], $searchnx9Pos[1]+$searchnx9Pos[3], $bslg9x, $bslg9y, 96, 0) = 1 or _ImageSearchArea($bslg5, 1, $searchnx9Pos[0], $searchnx9Pos[1], $searchnx9Pos[0]+$searchnx9Pos[2], $searchnx9Pos[1]+$searchnx9Pos[3], $bslg9x, $bslg9y, 96, 0) = 1 Then
            ControlClick("nx(9)","", "", "left",1,138,17)
            Beep(500, 1000)
            Sleep (120000)
        EndIf
        If _ImageSearchArea($10RResults, 1, $searchnx9Pos[0], $searchnx9Pos[1], $searchnx9Pos[0]+$searchnx9Pos[2], $searchnx9Pos[1]+$searchnx9Pos[3], $10RResults9x, $10RResults9y, 96, 0) = 1 Then
            If Not FileExists (@ScriptDir & "\SS") Then
            DirCreate (@ScriptDir & "\SS")
            EndIf
            _ScreenCapture_CaptureWnd(@ScriptDir & "\SS" & "\10RResults_"& @YEAR & @MON & @MDAY & @HOUR & @MIN & @SEC & @MSEC & ".png", "nx(9)")
            Sleep (10000)
        EndIf
        If _ImageSearchArea($sgrre, 1, $searchnx9Pos[0], $searchnx9Pos[1], $searchnx9Pos[0]+$searchnx9Pos[2], $searchnx9Pos[1]+$searchnx9Pos[3], $sgrre9x, $sgrre9y, 48, 0) = 1 Then
            If Not FileExists (@ScriptDir & "\SS") Then
            DirCreate (@ScriptDir & "\SS")
            EndIf
            Sleep(925)
            _ScreenCapture_CaptureWnd(@ScriptDir & "\SS" & "\sgrre_"& @YEAR & @MON & @MDAY & @HOUR & @MIN & @SEC & @MSEC & ".png", "nx(9)")
            Sleep (5500)
        EndIf
        Sleep (333)
    Else
        Sleep (60000)
    EndIf
EndFunc

Func searchnx10()
    If WinExists("nx(10)") Then
        $searchnx10Pos = WinGetPos("nx(10)")
        If _ImageSearchArea($nm1, 1, $searchnx10Pos[0], $searchnx10Pos[1], $searchnx10Pos[0]+$searchnx10Pos[2], $searchnx10Pos[1]+$searchnx10Pos[3], $nm10x, $nm10y, 96, 0) = 1 or _ImageSearchArea($nm2, 1, $searchnx10Pos[0], $searchnx10Pos[1], $searchnx10Pos[0]+$searchnx10Pos[2], $searchnx10Pos[1]+$searchnx10Pos[3], $nm10x, $nm10y, 96, 0) = 1 or _ImageSearchArea($nm3, 1, $searchnx10Pos[0], $searchnx10Pos[1], $searchnx10Pos[0]+$searchnx10Pos[2], $searchnx10Pos[1]+$searchnx10Pos[3], $nm10x, $nm10y, 96, 0) = 1 or _ImageSearchArea($nm4, 1, $searchnx10Pos[0], $searchnx10Pos[1], $searchnx10Pos[0]+$searchnx10Pos[2], $searchnx10Pos[1]+$searchnx10Pos[3], $nm10x, $nm10y, 96, 0) = 1 or _ImageSearchArea($nm5, 1, $searchnx10Pos[0], $searchnx10Pos[1], $searchnx10Pos[0]+$searchnx10Pos[2], $searchnx10Pos[1]+$searchnx10Pos[3], $nm10x, $nm10y, 96, 0) = 1 or _ImageSearchArea($nm6, 1, $searchnx10Pos[0], $searchnx10Pos[1], $searchnx10Pos[0]+$searchnx10Pos[2], $searchnx10Pos[1]+$searchnx10Pos[3], $nm10x, $nm10y, 96, 0) = 1 or _ImageSearchArea($nm7, 1, $searchnx10Pos[0], $searchnx10Pos[1], $searchnx10Pos[0]+$searchnx10Pos[2], $searchnx10Pos[1]+$searchnx10Pos[3], $nm10x, $nm10y, 96, 0) = 1 or _ImageSearchArea($nm8, 1, $searchnx10Pos[0], $searchnx10Pos[1], $searchnx10Pos[0]+$searchnx10Pos[2], $searchnx10Pos[1]+$searchnx10Pos[3], $nm10x, $nm10y, 96, 0) = 1 or _ImageSearchArea($nm9, 1, $searchnx10Pos[0], $searchnx10Pos[1], $searchnx10Pos[0]+$searchnx10Pos[2], $searchnx10Pos[1]+$searchnx10Pos[3], $nm10x, $nm10y, 96, 0) = 1 or _ImageSearchArea($nm10, 1, $searchnx10Pos[0], $searchnx10Pos[1], $searchnx10Pos[0]+$searchnx10Pos[2], $searchnx10Pos[1]+$searchnx10Pos[3], $nm10x, $nm10y, 96, 0) = 1 Then
            If _ImageSearchArea($nx41, 1, $searchnx10Pos[0], $searchnx10Pos[1], $searchnx10Pos[0]+$searchnx10Pos[2], $searchnx10Pos[1]+$searchnx10Pos[3], $nx410x, $nx410y, 96, 0) = 1 or _ImageSearchArea($nx42, 1, $searchnx10Pos[0], $searchnx10Pos[1], $searchnx10Pos[0]+$searchnx10Pos[2], $searchnx10Pos[1]+$searchnx10Pos[3], $nx410x, $nx410y, 96, 0) = 1 or _ImageSearchArea($nx43, 1, $searchnx10Pos[0], $searchnx10Pos[1], $searchnx10Pos[0]+$searchnx10Pos[2], $searchnx10Pos[1]+$searchnx10Pos[3], $nx410x, $nx410y, 96, 0) = 1 or _ImageSearchArea($nx44, 1, $searchnx10Pos[0], $searchnx10Pos[1], $searchnx10Pos[0]+$searchnx10Pos[2], $searchnx10Pos[1]+$searchnx10Pos[3], $nx410x, $nx410y, 96, 0) = 1 or _ImageSearchArea($nx45, 1, $searchnx10Pos[0], $searchnx10Pos[1], $searchnx10Pos[0]+$searchnx10Pos[2], $searchnx10Pos[1]+$searchnx10Pos[3], $nx410x, $nx410y, 96, 0) = 1 or _ImageSearchArea($nx46, 1, $searchnx10Pos[0], $searchnx10Pos[1], $searchnx10Pos[0]+$searchnx10Pos[2], $searchnx10Pos[1]+$searchnx10Pos[3], $nx410x, $nx410y, 96, 0) = 1 or _ImageSearchArea($nx47, 1, $searchnx10Pos[0], $searchnx10Pos[1], $searchnx10Pos[0]+$searchnx10Pos[2], $searchnx10Pos[1]+$searchnx10Pos[3], $nx410x, $nx410y, 96, 0) = 1 or _ImageSearchArea($nx48, 1, $searchnx10Pos[0], $searchnx10Pos[1], $searchnx10Pos[0]+$searchnx10Pos[2], $searchnx10Pos[1]+$searchnx10Pos[3], $nx410x, $nx410y, 96, 0) = 1 or _ImageSearchArea($nx49, 1, $searchnx10Pos[0], $searchnx10Pos[1], $searchnx10Pos[0]+$searchnx10Pos[2], $searchnx10Pos[1]+$searchnx10Pos[3], $nx410x, $nx410y, 96, 0) = 1 or _ImageSearchArea($nx410, 1, $searchnx10Pos[0], $searchnx10Pos[1], $searchnx10Pos[0]+$searchnx10Pos[2], $searchnx10Pos[1]+$searchnx10Pos[3], $nx410x, $nx410y, 96, 0) = 1 Then
                ControlClick("nx(10)","", "", "left",1,138,17)
                Beep(500, 1000)
                Sleep (120000)
            EndIf
        EndIf
        If _ImageSearchArea($bslg1, 1, $searchnx10Pos[0], $searchnx10Pos[1], $searchnx10Pos[0]+$searchnx10Pos[2], $searchnx10Pos[1]+$searchnx10Pos[3], $bslg10x, $bslg10y, 96, 0) = 1 or _ImageSearchArea($bslg2, 1, $searchnx10Pos[0], $searchnx10Pos[1], $searchnx10Pos[0]+$searchnx10Pos[2], $searchnx10Pos[1]+$searchnx10Pos[3], $bslg10x, $bslg10y, 96, 0) = 1 or _ImageSearchArea($bslg3, 1, $searchnx10Pos[0], $searchnx10Pos[1], $searchnx10Pos[0]+$searchnx10Pos[2], $searchnx10Pos[1]+$searchnx10Pos[3], $bslg10x, $bslg10y, 96, 0) = 1 or _ImageSearchArea($bslg4, 1, $searchnx10Pos[0], $searchnx10Pos[1], $searchnx10Pos[0]+$searchnx10Pos[2], $searchnx10Pos[1]+$searchnx10Pos[3], $bslg10x, $bslg10y, 96, 0) = 1 or _ImageSearchArea($bslg5, 1, $searchnx10Pos[0], $searchnx10Pos[1], $searchnx10Pos[0]+$searchnx10Pos[2], $searchnx10Pos[1]+$searchnx10Pos[3], $bslg10x, $bslg10y, 96, 0) = 1 Then
            ControlClick("nx(10)","", "", "left",1,138,17)
            Beep(500, 1000)
            Sleep (120000)
        EndIf
        If _ImageSearchArea($10RResults, 1, $searchnx10Pos[0], $searchnx10Pos[1], $searchnx10Pos[0]+$searchnx10Pos[2], $searchnx10Pos[1]+$searchnx10Pos[3], $10RResults10x, $10RResults10y, 96, 0) = 1 Then
            If Not FileExists (@ScriptDir & "\SS") Then
            DirCreate (@ScriptDir & "\SS")
            EndIf
            _ScreenCapture_CaptureWnd(@ScriptDir & "\SS" & "\10RResults_"& @YEAR & @MON & @MDAY & @HOUR & @MIN & @SEC & @MSEC & ".png", "nx(10)")
            Sleep (10000)
        EndIf
        If _ImageSearchArea($sgrre, 1, $searchnx10Pos[0], $searchnx10Pos[1], $searchnx10Pos[0]+$searchnx10Pos[2], $searchnx10Pos[1]+$searchnx10Pos[3], $sgrre10x, $sgrre10y, 48, 0) = 1 Then
            If Not FileExists (@ScriptDir & "\SS") Then
            DirCreate (@ScriptDir & "\SS")
            EndIf
            Sleep(925)
            _ScreenCapture_CaptureWnd(@ScriptDir & "\SS" & "\sgrre_"& @YEAR & @MON & @MDAY & @HOUR & @MIN & @SEC & @MSEC & ".png", "nx(10)")
            Sleep (5500)
        EndIf
        Sleep (333)
    Else
        Sleep (60000)
    EndIf
EndFunc

Func RunAllSends()
    $process1 = Run(@ScriptFullPath & " /nx1")
        Sleep (1111)
    $process2 = Run(@ScriptFullPath & " /nx2")
        Sleep (1111)
    $process3 = Run(@ScriptFullPath & " /nx3")
        Sleep (1111)
    $process4 = Run(@ScriptFullPath & " /nx4")
        Sleep (1111)
    $process5 = Run(@ScriptFullPath & " /nx5")
        Sleep (1111)
    $process5 = Run(@ScriptFullPath & " /nx6")
        Sleep (1111)
    $process5 = Run(@ScriptFullPath & " /nx7")
        Sleep (1111)
    $process5 = Run(@ScriptFullPath & " /nx8")
        Sleep (1111)
    $process5 = Run(@ScriptFullPath & " /nx9")
        Sleep (1111)
    $process5 = Run(@ScriptFullPath & " /nx10")
        Sleep (1111)
    While ProcessExists($process1); AND ProcessExists($process2) AND ProcessExists($process3)
        Sleep(1000)
    Wend
    Sleep(100)
EndFunc

Func KillAllAIO__Process ()
    RunWait ("TASKKILL /IM OTTCRerollAIO__.exe /F")
    RunWait ("TASKKILL /IM OTTCRerollAIO___x64.exe /F")
EndFunc

Func ExitProg()
    Exit
EndFunc

RunAllSends()

Func nx1()
    While 1
        searchnx1()
        Sleep (1111)
    Wend
EndFunc

Func nx2()
    While 1
        searchnx2()
        Sleep (1111)
    Wend
EndFunc

Func nx3()
    While 1
        searchnx3()
        Sleep (1111)
    Wend
EndFunc

Func nx4()
    While 1
        searchnx4()
        Sleep (1111)
    Wend
EndFunc

Func nx5()
    While 1
        searchnx5()
        Sleep (1111)
    Wend
EndFunc

Func nx6()
    While 1
        searchnx6()
        Sleep (1111)
    Wend
EndFunc

Func nx7()
    While 1
        searchnx7()
        Sleep (1111)
    Wend
EndFunc

Func nx8()
    While 1
        searchnx8()
        Sleep (1111)
    Wend
EndFunc

Func nx9()
    While 1
        searchnx9()
        Sleep (1111)
    Wend
EndFunc

Func nx10()
    While 1
        searchnx10()
        Sleep (1111)
    Wend
EndFunc

 

Link to post
Share on other sites
  • Moderators

@FranklinZero What is the application you're trying to automate? There is likely a better way to do it than imagesearch

 

                                                                                       ====In case you missed it, this is a Mod stepping into a thread====

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to post
Share on other sites

Its noxplayer, an android emulator, and looks like its need to be an image search cause what i'm looking for is parts of pictures, the script have 2 phases, first it identify one image and beeps, then i manually start the 2nd phase that he aways check if theres 2 images from 20 together on the screen. Imagesearch was running fine on w10, now its that way on win7. Already tried to fix reinstalling the C++ and stuff from scratch and still that way, i'm planning in learn and migrate to another language and see if its better on onthers.

If theres way better than imagesearch please enlighten me. :D

Link to post
Share on other sites
  • Moderators

I figured as much. We do not support android emulators, and 99% of their usage is for game automation (which it looks like you are attempting reading through your code). Please see our forum rules around game automation.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to post
Share on other sites
  • Moderators

Welcome to the AutoIt forum.

Unfortunately you appear to have missed the Forum rules on your way in. Please read them now - particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked.

See you soon with a legitimate question I hope.

The Moderation team

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to post
Share on other sites
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...