Sign in to follow this  
Followers 0
Regency

Pixel comparasion

6 posts in this topic

I am helping test a game, and the game has a anti scripting program or page in it. I defeated their old one and is reason for the noise on this one. But is there a way to check and compare them? If more then one of the picture or color exists it doesnt click on them?

This code is for the old script test.

#include <IE.au3>
$oLoginPage = _IECreate("http://209.51.212.50/login.aspx")
_IELoadWait($oLoginPage)
$oUser = _IEGetObjByName($oLoginPage, "Login1$UserName")
_IEFormElementSetValue($oUser, "regency")
$oPass = _IEGetObjByName($oLoginPage, "Login1$Password")
_IEFormElementSetValue($oPass, "diablo07")
$oLogIn = _IEGetObjByName($oLoginPage, "Login1$LoginLinkButton")
_IEAction($oLogIn, "click")
_IELoadWait($oLoginPage)

Local $begin = ''
Local $begin3 = ''
Local $dif3 = 0
Local $dif = 0

While 2
    Sleep(10)
    $dif = Int(TimerDiff($begin) / 1000)
    If $dif >= (2 * 60) Then
        MyFunction2()
        $begin = TimerInit()
    EndIf
WEnd
Func MyFunction2()
    $Crimes = _IECreate("http://209.51.212.50/Authenticated/Crimes.aspx")
    $oRadio = _IEGetObjById($Crimes, "ctl00_MainPageContent_rblCrimes_8")
    _IEAction($oRadio, "click")
    $oSubmit = _IEGetObjByName($Crimes, "ctl00$MainPageContent$btnCommit")
    _IEAction($oSubmit, "click")
    _IELoadWait($Crimes)
    WinSetState("TMN - Crimes - Microsoft Internet Explorer", "", @SW_MAXIMIZE)
    Sleep(3000)
    
    If PixelSearch(511,297, 517, 297, 0x84BA52) = 1 Then
        $oSubmit = _IEGetObjByName($Crimes, "ctl00$MainPageContent$valCrimes$btn1")
        _IEAction($oSubmit, "click")
        _IELoadWait($Crimes)
    ElseIf PixelSearch(611,297,617,297 0x84BA52) = 1 Then
        $oSubmit = _IEGetObjByName($Crimes, "ctl00$MainPageContent$valCrimes$btn2")
        _IEAction($oSubmit, "click")
        _IELoadWait($Crimes)
    ElseIf PixelSearch(711,297,717,297 0x84BA52) = 1 Then
        $oSubmit = _IEGetObjByName($Crimes, "ctl00$MainPageContent$valCrimes$btn3")
        _IEAction($oSubmit, "click")
        _IELoadWait($Crimes)
    ElseIf PixelSearch(511,397,517,397 , 0x84BA52) = 1 Then
        $oSubmit = _IEGetObjByName($Crimes, "ctl00$MainPageContent$valCrimes$btn4")
        _IEAction($oSubmit, "click")
        _IELoadWait($Crimes)
    ElseIf PixelSearch(611,397,617,397 0x84BA52) = 1 Then
        $oSubmit = _IEGetObjByName($Crimes, "ctl00$MainPageContent$valCrimes$btn5")
        _IEAction($oSubmit, "click")
        _IELoadWait($Crimes)
    ElseIf PixelSearch(711,397,717,397, 0x84BA52) = 1 Then
        $oSubmit = _IEGetObjByName($Crimes, "ctl00$MainPageContent$valCrimes$btn6")
        _IEAction($oSubmit, "click")
        _IELoadWait($Crimes)
    ElseIf PixelSearch(511,497,517,497, 0x84BA52) = 1 Then
        $oSubmit = _IEGetObjByName($Crimes, "ctl00$MainPageContent$valCrimes$btn7")
        _IEAction($oSubmit, "click")
        _IELoadWait($Crimes)
    ElseIf PixelSearch(611,497,617,497, 0x84BA52) = 1 Then
        $oSubmit = _IEGetObjByName($Crimes, "ctl00$MainPageContent$valCrimes$btn8")
        _IEAction($oSubmit, "click")
        _IELoadWait($Crimes)
    ElseIf PixelSearch(711,497,717,497,0x84BA52) = 1 Then
        $oSubmit = _IEGetObjByName($Crimes, "ctl00$MainPageContent$valCrimes$btn9")
        _IEAction($oSubmit, "click")
    EndIf

    
    
    $GTA = _IECreate("http://209.51.212.50/Authenticated/cartheft.aspx")
    $oRadio = _IEGetObjById($GTA, "ctl00$MainPageContent$rblCarThefts")
    _IEAction($oRadio, "click")
    $oSubmit = _IEGetObjByName($GTA, "ctl00$MainPageContent$btnCommit")
    _IEAction($oSubmit, "click")
    _IELoadWait($GTA)
    WinSetState("TMN - Steal a Car - Microsoft Internet Explorer", "", @SW_MAXIMIZE)
    Sleep(3000)
    If PixelSearch(411, 269, 428, 280, 0x84BA52) = 1 Then
        $oSubmit = _IEGetObjByName($GTA, "ctl00$MainPageContent$valCrimes$btn1")
        _IEAction($oSubmit, "click")
        _IELoadWait($GTA)
    ElseIf PixelSearch(511, 269, 528, 280, 0x84BA52) = 1 Then
        $oSubmit = _IEGetObjByName($GTA, "ctl00$MainPageContent$valCrimes$btn2")
        _IEAction($oSubmit, "click")
        _IELoadWait($GTA)
    ElseIf PixelSearch(611, 269, 628, 280, 0x84BA52) = 1 Then
        $oSubmit = _IEGetObjByName($GTA, "ctl00$MainPageContent$valCrimes$btn3")
        _IEAction($oSubmit, "click")
        _IELoadWait($GTA)
    ElseIf PixelSearch(410, 369, 424, 409, 0x84BA52) = 1 Then
        $oSubmit = _IEGetObjByName($GTA, "ctl00$MainPageContent$valCrimes$btn4")
        _IEAction($oSubmit, "click")
        _IELoadWait($GTA)
    ElseIf PixelSearch(510, 369, 524, 409, 0x84BA52) = 1 Then
        $oSubmit = _IEGetObjByName($GTA, "ctl00$MainPageContent$valCrimes$btn5")
        _IEAction($oSubmit, "click")
        _IELoadWait($GTA)
    ElseIf PixelSearch(610, 369, 624, 409,0x84BA52) = 1 Then
        $oSubmit = _IEGetObjByName($GTA, "ctl00$MainPageContent$valCrimes$btn6")
        _IEAction($oSubmit, "click")
        _IELoadWait($GTA)
    ElseIf PixelSearch(410, 469, 424, 509, 0x84BA52) = 1 Then
        $oSubmit = _IEGetObjByName($GTA, "ctl00$MainPageContent$valCrimes$btn7")
        _IEAction($oSubmit, "click")
        _IELoadWait($GTA)
    ElseIf PixelSearch(510, 469, 524, 509, 0x84BA52) = 1 Then
        $oSubmit = _IEGetObjByName($GTA, "ctl00$MainPageContent$valCrimes$btn8")
        _IEAction($oSubmit, "click")
        _IELoadWait($GTA)
    ElseIf PixelSearch(610, 469, 624, 509, 0x84BA52) = 1 Then
        $oSubmit = _IEGetObjByName($GTA, "ctl00$MainPageContent$valCrimes$btn9")
        _IEAction($oSubmit, "click")
        _IELoadWait($GTA)
    EndIf

    
    

EndFunc   ;==>MyFunction2

There is a new setup, the old one looked for a certain pixel and if it was there it would click it, but now all of them have the colors. anyway is there anything i can do to check and click the one that is our of place?

Posted Image

Share this post


Link to post
Share on other sites



Bump

Share this post


Link to post
Share on other sites

.... Seriously someone help...

Share this post


Link to post
Share on other sites

Please!!

Share this post


Link to post
Share on other sites

Bump

Share this post


Link to post
Share on other sites

So you are testing this "game" for someone, they want you to try and crack it.

If nobody is replying then doesn't it mean they are successful??

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0