Sign in to follow this  
Followers 0
mircea

get color

21 posts in this topic

#1 ·  Posted (edited)

hello there i got a problem i want to make for myself a Garena bot that will allow me to login each time when i start my pc but i got a problem

and i will explain what is the problem

when a room is full it give's you a message the room is full wait 5 seconds and all that stuff

and can someone tell me how to detect the color from that position ? the AutoIT V3 Window Info show me the Position -> 668, 448 and the color is 0xC33131 and i have no idea to make like this

$i = 0

If Color_Detected_in_That_Position Then Do $i = $i +1 Until $i = 6

well i don't know the thing to get the color i know is something with PixelSearch but i have now to put it or what do do

some help please

thank you very much

msgbox(1,"Atentie", "Merge doar pe Rezolutia 1280*1024",1)
run("C:\Program Files\Garena\garena.exe")
WinActivate("Garena", "")
winwaitactive("Garena")
sleep(4000)
mouseclick("Left",64,249,1)
sleep(2000)
mouseclick("Left",190,452,1)
sleep(2000)
mouseclick("left",635,347,2)
Edited by mircea

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

If i understand, you want the colour or a specific pixel? I use this program to get the colours;

While 1
$MPos = MouseGetPos()
$var = PixelGetColor($MPos[0], $MPos[1])
$col = Hex($var, 6)
TrayTip ("",$col, 1)
WEnd
Edited by Olsson

Share this post


Link to post
Share on other sites

i try like this and it;s still not working i replace your $MPos = MouseGetPos() with $MPos[0] = 668 $MPos[1] = 448 and still not working

msgbox(1,"Atentie", "Merge doar pe Rezolutia 1280*1024",1)
run("C:\Program Files\Garena\garena.exe")
WinActivate("Garena", "")
winwaitactive("Garena")
sleep(4000)
mouseclick("Left",64,249,1)
sleep(2000)
mouseclick("Left",190,452,1)
sleep(2000)
mouseclick("left",635,347,2)

If $MPos[0] = 668 $MPos[1] = 448 $var = PixelGetColor($MPos[0], $MPos[1])) $col = Hex($var, 5) $col = 33131 then msgbox(1,"Working?","Nope is not working")

and it gave me this error

C:\Garena Startup\Garena.au3 (13) : ==> Variable used without being declared.:
If $MPos[0] = 668 $MPos[1] = 448 $var = PixelGetColor($MPos[0], $MPos[1])) $col = Hex($var, 5) $col = 33131 then msgbox(1,"Working?","Nope is not working")
If ^ ERROR

Share this post


Link to post
Share on other sites

$var = PixelGetColor(668, 448)
$col = Hex($var, 6)
MsgBox (1, "", $col, 0)

If $col = 0x33131 Then msgbox(1,"Working?","Nope is not working")

I think this is what you're looking for?

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

ok i fix it that problem with the repeat thank you very much

i will update if i will have other problems thank you ver much

Edited by mircea

Share this post


Link to post
Share on other sites

well hello again can someone give me a program that helps me build a Gui interface

Thank you very much for the help you give me till now

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

@mircea

Koda Form Designer

Cheers, FireFox.

Edited by FireFox

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

sorry my bad

thank you very much for the link

Edited by mircea

Share this post


Link to post
Share on other sites

@mircea

not I cant just go on FAQ to reply #14 I think

Cheers, FireFox.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

well another problems seems

the problem is when i press the button Despre Program it shows up but and when i try to close it, it close both

how can i make it to close only the things i press X

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>


$Imaginea_Principala_1 = GUICreate("Garena Bot pentru logare automata made by Moisoiu Mircea", 605, 261, 295, 438)
$Despre_Program = GUICtrlCreateButton("Despre Program", 96, 48, 121, 33, 0)
$Start = GUICtrlCreateButton("Start", 312, 96, 121, 33, 0)
$fata1 = GUICtrlCreateLabel("Made by Mircea Moisoiu adresa de Yahoo Messenger ->moisoiumircea", 24, 16, 565, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$Alege_Rezolutia = GUICtrlCreateButton("Alege Rezolutia", 96, 144, 121, 33, 0)
$Alege_Camera = GUICtrlCreateButton("Alege Camera", 312, 48, 121, 33, 0)
$Tutorial = GUICtrlCreateButton("Tutorial", 96, 96, 121, 33, 0)
$fata2 = GUICtrlCreateLabel("1", 64, 56, 14, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$fata3 = GUICtrlCreateLabel("2", 64, 104, 14, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$fata4 = GUICtrlCreateLabel("3", 64, 152, 14, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$fata5 = GUICtrlCreateLabel("4", 280, 56, 14, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$fata6 = GUICtrlCreateLabel("5", 280, 104, 14, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)


While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case $msg =$Despre_Program
        $Imaginea_DespreProgram = GUICreate("Garena Bot pentru logare automata made by Moisoiu Mircea", 420, 159, 289, 117)
        $DespreProgram1 = GUICtrlCreateLabel("Despre Program", 40, 16, 142, 28)
        GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif")
        $DespreProgram2 = GUICtrlCreateLabel("Creat de Moisoiu Mircea", 40, 48, 197, 24)
        GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
        $DespreProgram3 = GUICtrlCreateLabel("Adresa de Yahoo Messenger - moisoiumircea ", 40, 80, 371, 24)
        GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
        $espreProgram4 = GUICtrlCreateLabel("Pentru evetualele Bug-uri, sau imbunatatiri", 40, 112, 345, 24)
        GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
        GUISetState(@SW_SHOW)
        while 2
            $msg2 = Guigetmsg()
            Select
            case $msg2 = $GUI_EVENT_CLOSE
                exitloop
            Endselect   
        WEnd
        

    
    EndSelect


WEnd
Edited by mircea

Share this post


Link to post
Share on other sites

bump please :-S

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>


$Imaginea_Principala_1 = GUICreate("Garena Bot pentru logare automata made by Moisoiu Mircea", 605, 261, 295, 438)
$Despre_Program = GUICtrlCreateButton("Despre Program", 96, 48, 121, 33, 0)
$Start = GUICtrlCreateButton("Start", 312, 96, 121, 33, 0)
$fata1 = GUICtrlCreateLabel("Made by Mircea Moisoiu adresa de Yahoo Messenger ->moisoiumircea", 24, 16, 565, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$Alege_Rezolutia = GUICtrlCreateButton("Alege Rezolutia", 96, 144, 121, 33, 0)
$Alege_Camera = GUICtrlCreateButton("Alege Camera", 312, 48, 121, 33, 0)
$Tutorial = GUICtrlCreateButton("Tutorial", 96, 96, 121, 33, 0)
$fata2 = GUICtrlCreateLabel("1", 64, 56, 14, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$fata3 = GUICtrlCreateLabel("2", 64, 104, 14, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$fata4 = GUICtrlCreateLabel("3", 64, 152, 14, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$fata5 = GUICtrlCreateLabel("4", 280, 56, 14, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$fata6 = GUICtrlCreateLabel("5", 280, 104, 14, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)


While 1
    $msg = GUIGetMsg()
    Switch $msg; I use switch
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Despre_Program
            GUISetState(@SW_DISABLE, $Imaginea_Principala_1); disable main window
            
            $Imaginea_DespreProgram = GUICreate("Garena Bot pentru logare automata made by Moisoiu Mircea", 420, 159, 289, 117)
            $DespreProgram1 = GUICtrlCreateLabel("Despre Program", 40, 16, 142, 28)
            GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif")
            $DespreProgram2 = GUICtrlCreateLabel("Creat de Moisoiu Mircea", 40, 48, 197, 24)
            GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
            $DespreProgram3 = GUICtrlCreateLabel("Adresa de Yahoo Messenger - moisoiumircea ", 40, 80, 371, 24)
            GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
            $espreProgram4 = GUICtrlCreateLabel("Pentru evetualele Bug-uri, sau imbunatatiri", 40, 112, 345, 24)
            GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
            
            GUISetState(@SW_SHOW); show "about window"

                
            While 1; infinity loop
                $msg = GUIGetMsg()
                Switch $msg
                    Case $GUI_EVENT_CLOSE; if you click X in your "about window" then
                        ExitLoop; exit loop :)
                EndSwitch
            WEnd
            
            GUISetState(@SW_ENABLE, $Imaginea_Principala_1); enable main window
            GUIDelete($Imaginea_DespreProgram); delete "about window"


    EndSwitch


WEnd

That can help you :)

Cheers :o

Edited by Danix

Share this post


Link to post
Share on other sites

is there a difference from switch with select ? :-S

or i have to change it too all

Share this post


Link to post
Share on other sites

You can use select :)

I don't know what is difference, read it in AutoIt help :o

Share this post


Link to post
Share on other sites

ok thank you very much for the help hope i will not have other problems :)

Share this post


Link to post
Share on other sites

#17 ·  Posted (edited)

@mircea

Only bump your topic after 24hours of your last reply :)

Edit1 : What autoit version youve got ? because Ive error with this :

$a = IniRead("camerele.ini","Camera 01","X")
;Called with wrong number of args ....

Edit2 : press Ctrl+t in your script for tidy, you will see that you've many error syntax...

Cheers, FireFox.

Edited by FireFox

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

@mircea

You can't have function in Case,loop like for or while so put I to end like this :

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>




$Imaginea_Principala_1 = GUICreate("Garena Bot pentru logare automata made by Moisoiu Mircea", 450, 180, 297, 438)
$Despre_Program = GUICtrlCreateButton("Despre Program", 56, 88, 121, 33, 0)
;$Start = GUICtrlCreateButton("Start", 248, 128, 121, 33, 0)
$fata1 = GUICtrlCreateLabel("Made by Mircea Moisoiu adresa de Yahoo Messenger ->moisoiumircea", 56, 16, 413, 64)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$Alege_Camera = GUICtrlCreateButton("Alege Camera", 248, 88, 121, 33, 0)
$Tutorial = GUICtrlCreateButton("Tutorial", 56, 136, 121, 33, 0)
$fata2 = GUICtrlCreateLabel("1", 32, 96, 14, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$fata3 = GUICtrlCreateLabel("2", 32, 136, 14, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$fata4 = GUICtrlCreateLabel("3", 224, 96, 14, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
;$fata5 = GUICtrlCreateLabel("4", 224, 136, 14, 24)
;GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)




While 1
    $msg = GUIGetMsg()
    Switch $msg; I use switch
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Despre_Program
            GUISetState(@SW_DISABLE, $Imaginea_Principala_1); disable main window

            $Imaginea_DespreProgram = GUICreate("Garena Bot pentru logare automata made by Moisoiu Mircea", 429, 254, 289, 117)
            $DespreProgram1 = GUICtrlCreateLabel("Despre Program", 40, 16, 142, 28)
            GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif")
            $DespreProgram2 = GUICtrlCreateLabel("Creat de Moisoiu Mircea", 40, 48, 197, 24)
            GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
            $DespreProgram3 = GUICtrlCreateLabel("Adresa de Yahoo Messenger - moisoiumircea", 40, 80, 371, 24)
            GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
            $DespreProgram4 = GUICtrlCreateLabel("Pentru evetualele Bug-uri, sau imbunatatiri", 40, 112, 345, 24)
            GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
            $Genereaza_Coordonatele = GUICtrlCreateButton("Genereaza Coordonatele", 264, 144, 145, 33, 0)
            $DespreProgram5 = GUICtrlCreateLabel("Pentru ca ai urmarit pasii asa cum trebuie poti sa dai click pe Genereaza Coordonatele ca Programul sa mearga bine", 40, 144, 211, 104)
            GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")

            GUISetState(@SW_SHOW); show "about window"


            While 1; infinity loop
                $msg = GUIGetMsg()
                Switch $msg
                    Case $GUI_EVENT_CLOSE; if you click X in your "about window" then
                        ExitLoop; exit loop smile.gif
                    Case $Genereaza_Coordonatele
                        MsgBox(0, "Atentie", "E nevoie sa apesi pe buton doar o data dar nu e nimica grav daca apesi de mai multe ori", 5)
                        IniWrite("camerele.ini", "Camera 01", "X", "613")
                        IniWrite("camerele.ini", "Camera 01", "Y", "319")
                        IniWrite("camerele.ini", "Camera 02", "X", "548")
                        IniWrite("camerele.ini", "Camera 02", "Y", "345")
                        IniWrite("camerele.ini", "Camera 03", "X", "608")
                        IniWrite("camerele.ini", "Camera 03", "Y", "369")
                        IniWrite("camerele.ini", "Camera 04", "X", "527")
                        IniWrite("camerele.ini", "Camera 04", "Y", "393")
                        IniWrite("camerele.ini", "Camera 05", "X", "479")
                        IniWrite("camerele.ini", "Camera 05", "Y", "416")
                        IniWrite("camerele.ini", "Camera 06", "X", "491")
                        IniWrite("camerele.ini", "Camera 06", "Y", "442")
                        IniWrite("camerele.ini", "Camera 07", "X", "551")
                        IniWrite("camerele.ini", "Camera 07", "Y", "471")
                        IniWrite("camerele.ini", "Camera 08", "X", "516")
                        IniWrite("camerele.ini", "Camera 08", "Y", "497")
                        IniWrite("camerele.ini", "Camera 09", "X", "540")
                        IniWrite("camerele.ini", "Camera 09", "Y", "520")
                        IniWrite("camerele.ini", "Camera 10", "X", "508")
                        IniWrite("camerele.ini", "Camera 10", "Y", "549")

                EndSwitch
            WEnd

            GUISetState(@SW_ENABLE, $Imaginea_Principala_1); enable main window
            GUIDelete($Imaginea_DespreProgram); delete "about window"

        Case $Alege_Camera
            $Imaginea_Camera = GUICreate("Garena Bot pentru logare automata made by Moisoiu Mircea", 597, 263, 289, 117)
            $Cameraa1 = GUICtrlCreateButton("Camera 1", 56, 80, 153, 33, 0)
            $Cameraa2 = GUICtrlCreateButton("Camera 2", 232, 80, 153, 33, 0)
            $Cameraa3 = GUICtrlCreateButton("Camera 3", 408, 80, 153, 33, 0)
            $Cameraa4 = GUICtrlCreateButton("Camera 4", 56, 120, 153, 33, 0)
            $Cameraa5 = GUICtrlCreateButton("Camera 5", 232, 120, 153, 33, 0)
            $Cameraa6 = GUICtrlCreateButton("Camera 6", 408, 120, 153, 33, 0)
            $Cameraa7 = GUICtrlCreateButton("Camera 7", 56, 160, 153, 33, 0)
            $Cameraa8 = GUICtrlCreateButton("Camera 8", 232, 160, 153, 33, 0)
            $Cameraa9 = GUICtrlCreateButton("Camera 9", 408, 160, 153, 33, 0)
            $Cameraa10 = GUICtrlCreateButton("Camera 10", 232, 208, 153, 33, 0)
            $Label1 = GUICtrlCreateLabel("Alegetiva Camera pe care doriti ca botul sa va logheze", 88, 16, 458, 28)
            GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif")
            GUISetState(@SW_SHOW)
            While 1; infinity loop
                $msg = GUIGetMsg()
                Switch $msg
                    Case $GUI_EVENT_CLOSE; if you click X in your "about window" then
                        ExitLoop; exit loop smile.gif

                    Case $Cameraa1
                        Run("C:\Program Files\Garena\garena.exe")
                        $a = IniRead("camerele.ini", "Camera 01", "X")
                        $b = IniRead("camerele.ini", "Camera 01", "Y")
                        WinActivate("Garena", "")
                        WinWaitActive("Garena")
                        Sleep(4000)
                        MouseClick("Left", 64, 249, 1)
                        Sleep(2000)
                        MouseClick("Left", 190, 452, 1)
                        Sleep(2000)
                        MouseClick("left", $a, $b, 2)
                        Sleep(1000)
                        ;$var = PixelGetColor(668, 448)
                        $var = PixelGetColor(724, 579)
                        $col = Hex($var, 5)
                        $var2 = PixelGetColor(650, 723)
                        $col2 = Hex($var2, 5)




                        If $col = 91717 Then
                            Do
                                Sleep(300)
                                Call(Repetare())
                                Call(Mouseulu())
                            Until $col = "FFFFF"

                        EndIf

                    Case $Cameraa2
                        $c = IniRead("camerele.ini", "Camera 02", "X")
                        $d = IniRead("camerele.ini", "Camera 02", "Y")
                        WinActivate("Garena", "")
                        WinWaitActive("Garena")
                        Sleep(4000)
                        MouseClick("Left", 64, 249, 1)
                        Sleep(2000)
                        MouseClick("Left", 190, 452, 1)
                        Sleep(2000)
                        MouseClick("left", $c, $d, 2)
                        Sleep(1000)
                        ;$var = PixelGetColor(668, 448)
                        $var = PixelGetColor(724, 579)
                        $col = Hex($var, 5)
                        $var2 = PixelGetColor(650, 723)
                        $col2 = Hex($var2, 5)




                        If $col = 91717 Then
                            Do
                                Sleep(300)
                                Call(Repetare2())
                                Call(Mouseulu2())
                            Until $col = "FFFFF"

                        EndIf
                    Case $Cameraa3
                        $e = IniRead("camerele.ini", "Camera 03", "X")
                        $f = IniRead("camerele.ini", "Camera 03", "Y")
                        WinActivate("Garena", "")
                        WinWaitActive("Garena")
                        Sleep(4000)
                        MouseClick("Left", 64, 249, 1)
                        Sleep(2000)
                        MouseClick("Left", 190, 452, 1)
                        Sleep(2000)
                        MouseClick("left", $e, $f, 2)
                        Sleep(1000)
                        ;$var = PixelGetColor(668, 448)
                        $var = PixelGetColor(724, 579)
                        $col = Hex($var, 5)
                        $var2 = PixelGetColor(650, 723)
                        $col2 = Hex($var2, 5)





                        If $col = 91717 Then
                            Do
                                Sleep(300)
                                Call(Repetare3())
                                Call(Mouseulu3())
                            Until $col = "FFFFF"

                        EndIf
                    Case $Cameraa4
                        $g = IniRead("camerele.ini", "Camera 04", "X")
                        $h = IniRead("camerele.ini", "Camera 04", "Y")
                        WinActivate("Garena", "")
                        WinWaitActive("Garena")
                        Sleep(4000)
                        MouseClick("Left", 64, 249, 1)
                        Sleep(2000)
                        MouseClick("Left", 190, 452, 1)
                        Sleep(2000)
                        MouseClick("left", $g, $h, 2)
                        Sleep(1000)
                        ;$var = PixelGetColor(668, 448)
                        $var = PixelGetColor(724, 579)
                        $col = Hex($var, 5)
                        $var2 = PixelGetColor(650, 723)
                        $col2 = Hex($var2, 5)




                        If $col = 91717 Then
                            Do
                                Sleep(300)
                                Call(Repetare4())
                                Call(Mouseulu4())
                            Until $col = "FFFFF"

                        EndIf
                    Case $Cameraa5
                        $i = IniRead("camerele.ini", "Camera 05", "X")
                        $s = IniRead("camerele.ini", "Camera 05", "Y")
                        WinActivate("Garena", "")
                        WinWaitActive("Garena")
                        Sleep(4000)
                        MouseClick("Left", 64, 249, 1)
                        Sleep(2000)
                        MouseClick("Left", 190, 452, 1)
                        Sleep(2000)
                        MouseClick("left", $i, $s, 2)
                        Sleep(1000)
                        ;$var = PixelGetColor(668, 448)
                        $var = PixelGetColor(724, 579)
                        $col = Hex($var, 5)
                        $var2 = PixelGetColor(650, 723)
                        $col2 = Hex($var2, 5)





                        If $col = 91717 Then
                            Do
                                Sleep(300)
                                Call(Repetare5())
                                Call(Mouseulu5())
                            Until $col = "FFFFF"

                        EndIf
                    Case $Cameraa6
                        $1 = IniRead("camerele.ini", "Camera 06", "X")
                        $2 = IniRead("camerele.ini", "Camera 06", "Y")
                        WinActivate("Garena", "")
                        WinWaitActive("Garena")
                        Sleep(4000)
                        MouseClick("Left", 64, 249, 1)
                        Sleep(2000)
                        MouseClick("Left", 190, 452, 1)
                        Sleep(2000)
                        MouseClick("left", $1, $2, 2)
                        Sleep(1000)
                        ;$var = PixelGetColor(668, 448)
                        $var = PixelGetColor(724, 579)
                        $col = Hex($var, 5)
                        $var2 = PixelGetColor(650, 723)
                        $col2 = Hex($var2, 5)




                        If $col = 91717 Then
                            Do
                                Sleep(300)
                                Call(Repetare6())
                                Call(Mouseulu6())
                            Until $col = "FFFFF"

                        EndIf
                    Case $Cameraa7
                        $3 = IniRead("camerele.ini", "Camera 07", "X")
                        $4 = IniRead("camerele.ini", "Camera 07", "Y")
                        WinActivate("Garena", "")
                        WinWaitActive("Garena")
                        Sleep(4000)
                        MouseClick("Left", 64, 249, 1)
                        Sleep(2000)
                        MouseClick("Left", 190, 452, 1)
                        Sleep(2000)
                        MouseClick("left", $3, $4, 2)
                        Sleep(1000)
                        ;$var = PixelGetColor(668, 448)
                        $var = PixelGetColor(724, 579)
                        $col = Hex($var, 5)
                        $var2 = PixelGetColor(650, 723)
                        $col2 = Hex($var2, 5)




                        If $col = 91717 Then
                            Do
                                Sleep(300)
                                Call(Repetare7())
                                Call(Mouseulu7())
                            Until $col = "FFFFF"

                        EndIf
                    Case $Cameraa8
                        $5 = IniRead("camerele.ini", "Camera 08", "X")
                        $6 = IniRead("camerele.ini", "Camera 08", "Y")
                        WinActivate("Garena", "")
                        WinWaitActive("Garena")
                        Sleep(4000)
                        MouseClick("Left", 64, 249, 1)
                        Sleep(2000)
                        MouseClick("Left", 190, 452, 1)
                        Sleep(2000)
                        MouseClick("left", $5, $6, 2)
                        Sleep(1000)
                        ;$var = PixelGetColor(668, 448)
                        $var = PixelGetColor(724, 579)
                        $col = Hex($var, 5)
                        $var2 = PixelGetColor(650, 723)
                        $col2 = Hex($var2, 5)



                        If $col = 91717 Then
                            Do
                                Sleep(300)
                                Call(Repetare8())
                                Call(Mouseulu8())
                            Until $col = "FFFFF"

                        EndIf
                    Case $Cameraa9
                        $7 = IniRead("camerele.ini", "Camera 09", "X")
                        $8 = IniRead("camerele.ini", "Camera 09", "Y")
                        WinActivate("Garena", "")
                        WinWaitActive("Garena")
                        Sleep(4000)
                        MouseClick("Left", 64, 249, 1)
                        Sleep(2000)
                        MouseClick("Left", 190, 452, 1)
                        Sleep(2000)
                        MouseClick("left", $7, $8, 2)
                        Sleep(1000)
                        ;$var = PixelGetColor(668, 448)
                        $var = PixelGetColor(724, 579)
                        $col = Hex($var, 5)
                        $var2 = PixelGetColor(650, 723)
                        $col2 = Hex($var2, 5)





                        If $col = 91717 Then
                            Do
                                Sleep(300)
                                Call(Repetare9())
                                Call(Mouseulu9())
                            Until $col = "FFFFF"

                        EndIf
                    Case $Cameraa10
                        $9 = IniRead("camerele.ini", "Camera 10", "X")
                        $10 = IniRead("camerele.ini", "Camera 10", "Y")
                        WinActivate("Garena", "")
                        WinWaitActive("Garena")
                        Sleep(4000)
                        MouseClick("Left", 64, 249, 1)
                        Sleep(2000)
                        MouseClick("Left", 190, 452, 1)
                        Sleep(2000)
                        MouseClick("left", $9, $10, 2)
                        Sleep(1000)
                        ;$var = PixelGetColor(668, 448)
                        $var = PixelGetColor(724, 579)
                        $col = Hex($var, 5)
                        $var2 = PixelGetColor(650, 723)
                        $col2 = Hex($var2, 5)




                        If $col = 91717 Then
                            Do
                                Sleep(300)
                                Call(Repetare10())
                                Call(Mouseulu10())
                            Until $col = "FFFFF"

                        EndIf

                EndSwitch
            WEnd

            GUISetState(@SW_ENABLE, $Imaginea_Principala_1); enable main window
            GUIDelete($Imaginea_Camera); delete "about window"

        Case $Tutorial
            $Imaginea_Tutorial = GUICreate("Garena Bot pentru logare automata made by Moisoiu Mircea", 521, 246, 289, 117)
            $Tutorial1 = GUICtrlCreateLabel("Atentie, Urmeaza pasi cu mare atentie pentru ca fiecare pas are treaba lui de facut (in special Despre Program care trebuie vizitat doar 1 data),inainte sa fie pornita Garena, si alegi camera si porneste automat", 32, 16, 449, 180)
            GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
            GUISetState(@SW_SHOW)
            While 1; infinity loop
                $msg = GUIGetMsg()
                Switch $msg
                    Case $GUI_EVENT_CLOSE; if you click X in your "about window" then
                        ExitLoop; exit loop smile.gif
                EndSwitch
            WEnd
            GUISetState(@SW_ENABLE, $Imaginea_Principala_1); enable main window
            GUIDelete($Imaginea_Tutorial); delete "about window"

            ;case $Start


    EndSwitch
WEnd

Func Repetare()
    If $col = 91717 Then
        Sleep(300)
        MouseClick("Left", 679, 546, 1)
        Sleep(5000)
    EndIf
EndFunc   ;==>Repetare

Func Mouseulu()
    Sleep(1200)
    MouseClick("left", $a, $b, 2)
EndFunc   ;==>Mouseulu


Func Repetare2()
    If $col = 91717 Then
        Sleep(300)
        MouseClick("Left", 679, 546, 1)
        Sleep(5000)
    EndIf
EndFunc   ;==>Repetare2

Func Mouseulu2()
    Sleep(1200)
    MouseClick("left", $c, $d, 2)
EndFunc   ;==>Mouseulu2

Func Repetare3()
    If $col = 91717 Then
        Sleep(300)
        MouseClick("Left", 679, 546, 1)
        Sleep(5000)
    EndIf
EndFunc   ;==>Repetare3

Func Mouseulu3()
    Sleep(1200)
    MouseClick("left", $e, $f, 2)
EndFunc   ;==>Mouseulu3

Func Repetare4()
    If $col = 91717 Then
        Sleep(300)
        MouseClick("Left", 679, 546, 1)
        Sleep(5000)
    EndIf
EndFunc   ;==>Repetare4

Func Mouseulu4()
    Sleep(1200)
    MouseClick("left", $g, $h, 2)
EndFunc   ;==>Mouseulu4

Func Repetare5()
    If $col = 91717 Then
        Sleep(300)
        MouseClick("Left", 679, 546, 1)
        Sleep(5000)
    EndIf
EndFunc   ;==>Repetare5

Func Mouseulu5()
    Sleep(1200)
    MouseClick("left", $i, $s, 2)
EndFunc   ;==>Mouseulu5

Func Repetare6()
    If $col = 91717 Then
        Sleep(300)
        MouseClick("Left", 679, 546, 1)
        Sleep(5000)
    EndIf
EndFunc   ;==>Repetare6

Func Mouseulu6()
    Sleep(1200)
    MouseClick("left", $1, $2, 2)
EndFunc   ;==>Mouseulu6

Func Repetare7()
    If $col = 91717 Then
        Sleep(300)
        MouseClick("Left", 679, 546, 1)
        Sleep(5000)
    EndIf
EndFunc   ;==>Repetare7

Func Mouseulu7()
    Sleep(1200)
    MouseClick("left", $3, $4, 2)
EndFunc   ;==>Mouseulu7
Func Repetare8()
    If $col = 91717 Then
        Sleep(300)
        MouseClick("Left", 679, 546, 1)
        Sleep(5000)
    EndIf
EndFunc   ;==>Repetare8

Func Mouseulu8()
    Sleep(1200)
    MouseClick("left", $5, $6, 2)
EndFunc   ;==>Mouseulu8
Func Repetare9()
    If $col = 91717 Then
        Sleep(300)
        MouseClick("Left", 679, 546, 1)
        Sleep(5000)
    EndIf
EndFunc   ;==>Repetare9

Func Mouseulu9()
    Sleep(1200)
    MouseClick("left", $7, $8, 2)
EndFunc   ;==>Mouseulu9
Func Repetare10()
    If $col = 91717 Then
        Sleep(300)
        MouseClick("Left", 679, 546, 1)
        Sleep(5000)
    EndIf
EndFunc   ;==>Repetare10

Func Mouseulu10()
    Sleep(1200)
    MouseClick("left", $9, $10, 2)
EndFunc   ;==>Mouseulu10

Cheers, FireFox.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

oau ... ok sorry for the mistake but i found out what was the problem (And you save me from another problem cheers ) the problem was i forgot to put ,"")

$a = IniRead("camerele.ini","Camera01","X","")
$b = IniRead("camerele.ini","Camera01","Y","")

Share this post


Link to post
Share on other sites

@mircea

ok fixed your script :

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>




$Imaginea_Principala_1 = GUICreate("Garena Bot pentru logare automata made by Moisoiu Mircea", 450, 180, 297, 438)
$Despre_Program = GUICtrlCreateButton("Despre Program", 56, 88, 121, 33, 0)
;$Start = GUICtrlCreateButton("Start", 248, 128, 121, 33, 0)
$fata1 = GUICtrlCreateLabel("Made by Mircea Moisoiu adresa de Yahoo Messenger ->moisoiumircea", 56, 16, 413, 64)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$Alege_Camera = GUICtrlCreateButton("Alege Camera", 248, 88, 121, 33, 0)
$Tutorial = GUICtrlCreateButton("Tutorial", 56, 136, 121, 33, 0)
$fata2 = GUICtrlCreateLabel("1", 32, 96, 14, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$fata3 = GUICtrlCreateLabel("2", 32, 136, 14, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$fata4 = GUICtrlCreateLabel("3", 224, 96, 14, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
;$fata5 = GUICtrlCreateLabel("4", 224, 136, 14, 24)
;GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)




While 1
    $msg = GUIGetMsg()
    Switch $msg; I use switch
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Despre_Program
            GUISetState(@SW_DISABLE, $Imaginea_Principala_1); disable main window

            $Imaginea_DespreProgram = GUICreate("Garena Bot pentru logare automata made by Moisoiu Mircea", 429, 254, 289, 117)
            $DespreProgram1 = GUICtrlCreateLabel("Despre Program", 40, 16, 142, 28)
            GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif")
            $DespreProgram2 = GUICtrlCreateLabel("Creat de Moisoiu Mircea", 40, 48, 197, 24)
            GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
            $DespreProgram3 = GUICtrlCreateLabel("Adresa de Yahoo Messenger - moisoiumircea", 40, 80, 371, 24)
            GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
            $DespreProgram4 = GUICtrlCreateLabel("Pentru evetualele Bug-uri, sau imbunatatiri", 40, 112, 345, 24)
            GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
            $Genereaza_Coordonatele = GUICtrlCreateButton("Genereaza Coordonatele", 264, 144, 145, 33, 0)
            $DespreProgram5 = GUICtrlCreateLabel("Pentru ca ai urmarit pasii asa cum trebuie poti sa dai click pe Genereaza Coordonatele ca Programul sa mearga bine", 40, 144, 211, 104)
            GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")

            GUISetState(@SW_SHOW); show "about window"


            While 1; infinity loop
                $msg = GUIGetMsg()
                Switch $msg
                    Case $GUI_EVENT_CLOSE; if you click X in your "about window" then
                        ExitLoop; exit loop smile.gif
                    Case $Genereaza_Coordonatele
                        MsgBox(0, "Atentie", "E nevoie sa apesi pe buton doar o data dar nu e nimica grav daca apesi de mai multe ori", 5)
                        IniWrite("camerele.ini", "Camera 01", "X", "613")
                        IniWrite("camerele.ini", "Camera 01", "Y", "319")
                        IniWrite("camerele.ini", "Camera 02", "X", "548")
                        IniWrite("camerele.ini", "Camera 02", "Y", "345")
                        IniWrite("camerele.ini", "Camera 03", "X", "608")
                        IniWrite("camerele.ini", "Camera 03", "Y", "369")
                        IniWrite("camerele.ini", "Camera 04", "X", "527")
                        IniWrite("camerele.ini", "Camera 04", "Y", "393")
                        IniWrite("camerele.ini", "Camera 05", "X", "479")
                        IniWrite("camerele.ini", "Camera 05", "Y", "416")
                        IniWrite("camerele.ini", "Camera 06", "X", "491")
                        IniWrite("camerele.ini", "Camera 06", "Y", "442")
                        IniWrite("camerele.ini", "Camera 07", "X", "551")
                        IniWrite("camerele.ini", "Camera 07", "Y", "471")
                        IniWrite("camerele.ini", "Camera 08", "X", "516")
                        IniWrite("camerele.ini", "Camera 08", "Y", "497")
                        IniWrite("camerele.ini", "Camera 09", "X", "540")
                        IniWrite("camerele.ini", "Camera 09", "Y", "520")
                        IniWrite("camerele.ini", "Camera 10", "X", "508")
                        IniWrite("camerele.ini", "Camera 10", "Y", "549")

                EndSwitch
            WEnd

            GUISetState(@SW_ENABLE, $Imaginea_Principala_1); enable main window
            GUIDelete($Imaginea_DespreProgram); delete "about window"

        Case $Alege_Camera
            $Imaginea_Camera = GUICreate("Garena Bot pentru logare automata made by Moisoiu Mircea", 597, 263, 289, 117)
            $Cameraa1 = GUICtrlCreateButton("Camera 1", 56, 80, 153, 33, 0)
            $Cameraa2 = GUICtrlCreateButton("Camera 2", 232, 80, 153, 33, 0)
            $Cameraa3 = GUICtrlCreateButton("Camera 3", 408, 80, 153, 33, 0)
            $Cameraa4 = GUICtrlCreateButton("Camera 4", 56, 120, 153, 33, 0)
            $Cameraa5 = GUICtrlCreateButton("Camera 5", 232, 120, 153, 33, 0)
            $Cameraa6 = GUICtrlCreateButton("Camera 6", 408, 120, 153, 33, 0)
            $Cameraa7 = GUICtrlCreateButton("Camera 7", 56, 160, 153, 33, 0)
            $Cameraa8 = GUICtrlCreateButton("Camera 8", 232, 160, 153, 33, 0)
            $Cameraa9 = GUICtrlCreateButton("Camera 9", 408, 160, 153, 33, 0)
            $Cameraa10 = GUICtrlCreateButton("Camera 10", 232, 208, 153, 33, 0)
            $Label1 = GUICtrlCreateLabel("Alegetiva Camera pe care doriti ca botul sa va logheze", 88, 16, 458, 28)
            GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif")
            GUISetState(@SW_SHOW)
            While 1; infinity loop
                $msg = GUIGetMsg()
                Switch $msg
                    Case $GUI_EVENT_CLOSE; if you click X in your "about window" then
                        ExitLoop; exit loop smile.gif

                    Case $Cameraa1
                        Run("C:\Program Files\Garena\garena.exe")
                        $a = IniRead("camerele.ini", "Camera 01", "X", "")
                        $b = IniRead("camerele.ini", "Camera 01", "Y", "")
                        WinActivate("Garena", "")
                        WinWaitActive("Garena")
                        Sleep(4000)
                        MouseClick("Left", 64, 249, 1)
                        Sleep(2000)
                        MouseClick("Left", 190, 452, 1)
                        Sleep(2000)
                        MouseClick("left", $a, $b, 2)
                        Sleep(1000)
                        ;$var = PixelGetColor(668, 448)
                        $var = PixelGetColor(724, 579)
                        $col = Hex($var, 5)
                        $var2 = PixelGetColor(650, 723)
                        $col2 = Hex($var2, 5)
                        
                        If $col = 91717 Then
                            Do
                                Sleep(300)
                                Call(Repetare())
                                Call(Mouseulu())
                            Until $col = "FFFFF"
                        EndIf
                        
                        
                    Case $Cameraa2
                        $c = IniRead("camerele.ini", "Camera 02", "X", "")
                        $d = IniRead("camerele.ini", "Camera 02", "Y", "")
                        WinActivate("Garena", "")
                        WinWaitActive("Garena")
                        Sleep(4000)
                        MouseClick("Left", 64, 249, 1)
                        Sleep(2000)
                        MouseClick("Left", 190, 452, 1)
                        Sleep(2000)
                        MouseClick("left", $c, $d, 2)
                        Sleep(1000)
                        ;$var = PixelGetColor(668, 448)
                        $var = PixelGetColor(724, 579)
                        $col = Hex($var, 5)
                        $var2 = PixelGetColor(650, 723)
                        $col2 = Hex($var2, 5)
                        
                        If $col = 91717 Then
                            Do
                                Sleep(300)
                                Call(Repetare2())
                                Call(Mouseulu2())
                            Until $col = "FFFFF"
                        EndIf
                        
                        
                    Case $Cameraa3
                        $e = IniRead("camerele.ini", "Camera 03", "X", "")
                        $f = IniRead("camerele.ini", "Camera 03", "Y", "")
                        WinActivate("Garena", "")
                        WinWaitActive("Garena")
                        Sleep(4000)
                        MouseClick("Left", 64, 249, 1)
                        Sleep(2000)
                        MouseClick("Left", 190, 452, 1)
                        Sleep(2000)
                        MouseClick("left", $e, $f, 2)
                        Sleep(1000)
                        ;$var = PixelGetColor(668, 448)
                        $var = PixelGetColor(724, 579)
                        $col = Hex($var, 5)
                        $var2 = PixelGetColor(650, 723)
                        $col2 = Hex($var2, 5)
                        
                        If $col = 91717 Then
                            Do
                                Sleep(300)
                                Call(Repetare3())
                                Call(Mouseulu3())
                            Until $col = "FFFFF"
                        EndIf
                        
                    Case $Cameraa4
                        $g = IniRead("camerele.ini", "Camera 04", "X", "")
                        $h = IniRead("camerele.ini", "Camera 04", "Y", "")
                        WinActivate("Garena", "")
                        WinWaitActive("Garena")
                        Sleep(4000)
                        MouseClick("Left", 64, 249, 1)
                        Sleep(2000)
                        MouseClick("Left", 190, 452, 1)
                        Sleep(2000)
                        MouseClick("left", $g, $h, 2)
                        Sleep(1000)
                        ;$var = PixelGetColor(668, 448)
                        $var = PixelGetColor(724, 579)
                        $col = Hex($var, 5)
                        $var2 = PixelGetColor(650, 723)
                        $col2 = Hex($var2, 5)
                        
                        If $col = 91717 Then
                            Do
                                Sleep(300)
                                Call(Repetare4())
                                Call(Mouseulu4())
                            Until $col = "FFFFF"
                        EndIf
                        
                        
                    Case $Cameraa5
                        $i = IniRead("camerele.ini", "Camera 05", "X", "")
                        $s = IniRead("camerele.ini", "Camera 05", "Y", "")
                        WinActivate("Garena", "")
                        WinWaitActive("Garena")
                        Sleep(4000)
                        MouseClick("Left", 64, 249, 1)
                        Sleep(2000)
                        MouseClick("Left", 190, 452, 1)
                        Sleep(2000)
                        MouseClick("left", $i, $s, 2)
                        Sleep(1000)
                        ;$var = PixelGetColor(668, 448)
                        $var = PixelGetColor(724, 579)
                        $col = Hex($var, 5)
                        $var2 = PixelGetColor(650, 723)
                        $col2 = Hex($var2, 5)
                        
                        If $col = 91717 Then
                            Do
                                Sleep(300)
                                Call(Repetare5())
                                Call(Mouseulu5())
                            Until $col = "FFFFF"
                        EndIf
                        
                        
                    Case $Cameraa6
                        $1 = IniRead("camerele.ini", "Camera 06", "X", "")
                        $2 = IniRead("camerele.ini", "Camera 06", "Y", "")
                        WinActivate("Garena", "")
                        WinWaitActive("Garena")
                        Sleep(4000)
                        MouseClick("Left", 64, 249, 1)
                        Sleep(2000)
                        MouseClick("Left", 190, 452, 1)
                        Sleep(2000)
                        MouseClick("left", $1, $2, 2)
                        Sleep(1000)
                        ;$var = PixelGetColor(668, 448)
                        $var = PixelGetColor(724, 579)
                        $col = Hex($var, 5)
                        $var2 = PixelGetColor(650, 723)
                        $col2 = Hex($var2, 5)
                        
                        If $col = 91717 Then
                            Do
                                Sleep(300)
                                Call(Repetare6())
                                Call(Mouseulu6())
                            Until $col = "FFFFF"
                        EndIf
                        
                        
                    Case $Cameraa7
                        $3 = IniRead("camerele.ini", "Camera 07", "X", "")
                        $4 = IniRead("camerele.ini", "Camera 07", "Y", "")
                        WinActivate("Garena", "")
                        WinWaitActive("Garena")
                        Sleep(4000)
                        MouseClick("Left", 64, 249, 1)
                        Sleep(2000)
                        MouseClick("Left", 190, 452, 1)
                        Sleep(2000)
                        MouseClick("left", $3, $4, 2)
                        Sleep(1000)
                        ;$var = PixelGetColor(668, 448)
                        $var = PixelGetColor(724, 579)
                        $col = Hex($var, 5)
                        $var2 = PixelGetColor(650, 723)
                        $col2 = Hex($var2, 5)
                        
                        If $col = 91717 Then
                            Do
                                Sleep(300)
                                Call(Repetare7())
                                Call(Mouseulu7())
                            Until $col = "FFFFF"
                        EndIf
                        
                        
                    Case $Cameraa8
                        $5 = IniRead("camerele.ini", "Camera 08", "X", "")
                        $6 = IniRead("camerele.ini", "Camera 08", "Y", "")
                        WinActivate("Garena", "")
                        WinWaitActive("Garena")
                        Sleep(4000)
                        MouseClick("Left", 64, 249, 1)
                        Sleep(2000)
                        MouseClick("Left", 190, 452, 1)
                        Sleep(2000)
                        MouseClick("left", $5, $6, 2)
                        Sleep(1000)
                        ;$var = PixelGetColor(668, 448)
                        $var = PixelGetColor(724, 579)
                        $col = Hex($var, 5)
                        $var2 = PixelGetColor(650, 723)
                        $col2 = Hex($var2, 5)
                        
                        If $col = 91717 Then
                            Do
                                Sleep(300)
                                Call(Repetare8())
                                Call(Mouseulu8())
                            Until $col = "FFFFF"
                        EndIf
                        
                        
                    Case $Cameraa9
                        $7 = IniRead("camerele.ini", "Camera 09", "X", "")
                        $8 = IniRead("camerele.ini", "Camera 09", "Y", "")
                        WinActivate("Garena", "")
                        WinWaitActive("Garena")
                        Sleep(4000)
                        MouseClick("Left", 64, 249, 1)
                        Sleep(2000)
                        MouseClick("Left", 190, 452, 1)
                        Sleep(2000)
                        MouseClick("left", $7, $8, 2)
                        Sleep(1000)
                        ;$var = PixelGetColor(668, 448)
                        $var = PixelGetColor(724, 579)
                        $col = Hex($var, 5)
                        $var2 = PixelGetColor(650, 723)
                        $col2 = Hex($var2, 5)
                        
                        If $col = 91717 Then
                            Do
                                Sleep(300)
                                Call(Repetare9())
                                Call(Mouseulu9())
                            Until $col = "FFFFF"
                        EndIf
                        
                        
                    Case $Cameraa10
                        $9 = IniRead("camerele.ini", "Camera 10", "X", "")
                        $10 = IniRead("camerele.ini", "Camera 10", "Y", "")
                        WinActivate("Garena", "")
                        WinWaitActive("Garena")
                        Sleep(4000)
                        MouseClick("Left", 64, 249, 1)
                        Sleep(2000)
                        MouseClick("Left", 190, 452, 1)
                        Sleep(2000)
                        MouseClick("left", $9, $10, 2)
                        Sleep(1000)
                        ;$var = PixelGetColor(668, 448)
                        $var = PixelGetColor(724, 579)
                        $col = Hex($var, 5)
                        $var2 = PixelGetColor(650, 723)
                        $col2 = Hex($var2, 5)
                        
                        If $col = 91717 Then
                            Do
                                Sleep(300)
                                Call(Repetare10())
                                Call(Mouseulu10())
                            Until $col = "FFFFF"
                        EndIf
                EndSwitch
            WEnd
            
            GUISetState(@SW_ENABLE, $Imaginea_Principala_1); enable main window
            GUIDelete($Imaginea_Camera); delete "about window"
            
        Case $Tutorial
            $Imaginea_Tutorial = GUICreate("Garena Bot pentru logare automata made by Moisoiu Mircea", 521, 246, 289, 117)
            $Tutorial1 = GUICtrlCreateLabel("Atentie, Urmeaza pasi cu mare atentie pentru ca fiecare pas are treaba lui de facut (in special Despre Program care trebuie vizitat doar 1 data),inainte sa fie pornita Garena, si alegi camera si porneste automat", 32, 16, 449, 180)
            GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
            GUISetState(@SW_SHOW)
            While 1; infinity loop
                $msg = GUIGetMsg()
                Switch $msg
                    Case $GUI_EVENT_CLOSE; if you click X in your "about window" then
                        ExitLoop; exit loop smile.gif
                EndSwitch
            WEnd
            GUISetState(@SW_ENABLE, $Imaginea_Principala_1); enable main window
            GUIDelete($Imaginea_Tutorial); delete "about window"
            
            ;case $Start
    EndSwitch
WEnd


Func Repetare()
    If $col = 91717 Then
        Sleep(300)
        MouseClick("Left", 679, 546, 1)
        Sleep(5000)
    EndIf
EndFunc   ;==>Repetare

Func Mouseulu()
    Sleep(1200)
    MouseClick("left", $a, $b, 2)
EndFunc   ;==>Mouseulu


Func Repetare2()
    If $col = 91717 Then
        Sleep(300)
        MouseClick("Left", 679, 546, 1)
        Sleep(5000)
    EndIf
EndFunc   ;==>Repetare2

Func Mouseulu2()
    Sleep(1200)
    MouseClick("left", $c, $d, 2)
EndFunc   ;==>Mouseulu2


Func Repetare3()
    If $col = 91717 Then
        Sleep(300)
        MouseClick("Left", 679, 546, 1)
        Sleep(5000)
    EndIf
EndFunc   ;==>Repetare3

Func Mouseulu3()
    Sleep(1200)
    MouseClick("left", $e, $f, 2)
EndFunc   ;==>Mouseulu3


Func Repetare4()
    If $col = 91717 Then
        Sleep(300)
        MouseClick("Left", 679, 546, 1)
        Sleep(5000)
    EndIf
EndFunc   ;==>Repetare4

Func Mouseulu4()
    Sleep(1200)
    MouseClick("left", $g, $h, 2)
EndFunc   ;==>Mouseulu4


Func Repetare5()
    If $col = 91717 Then
        Sleep(300)
        MouseClick("Left", 679, 546, 1)
        Sleep(5000)
    EndIf
EndFunc   ;==>Repetare5

Func Mouseulu5()
    Sleep(1200)
    MouseClick("left", $i, $s, 2)
EndFunc   ;==>Mouseulu5


Func Repetare6()
    If $col = 91717 Then
        Sleep(300)
        MouseClick("Left", 679, 546, 1)
        Sleep(5000)
    EndIf
EndFunc   ;==>Repetare6

Func Mouseulu6()
    Sleep(1200)
    MouseClick("left", $1, $2, 2)
EndFunc   ;==>Mouseulu6


Func Repetare7()
    If $col = 91717 Then
        Sleep(300)
        MouseClick("Left", 679, 546, 1)
        Sleep(5000)
    EndIf
EndFunc   ;==>Repetare7

Func Mouseulu7()
    Sleep(1200)
    MouseClick("left", $3, $4, 2)
EndFunc   ;==>Mouseulu7


Func Repetare8()
    If $col = 91717 Then
        Sleep(300)
        MouseClick("Left", 679, 546, 1)
        Sleep(5000)
    EndIf
EndFunc   ;==>Repetare8

Func Mouseulu8()
    Sleep(1200)
    MouseClick("left", $5, $6, 2)
EndFunc   ;==>Mouseulu8


Func Repetare9()
    If $col = 91717 Then
        Sleep(300)
        MouseClick("Left", 679, 546, 1)
        Sleep(5000)
    EndIf
EndFunc   ;==>Repetare9

Func Mouseulu9()
    Sleep(1200)
    MouseClick("left", $7, $8, 2)
EndFunc   ;==>Mouseulu9


Func Repetare10()
    If $col = 91717 Then
        Sleep(300)
        MouseClick("Left", 679, 546, 1)
        Sleep(5000)
    EndIf
EndFunc   ;==>Repetare10

Func Mouseulu10()
    Sleep(1200)
    MouseClick("left", $9, $10, 2)
EndFunc   ;==>Mouseulu10

Whats your problem ?

Cheers, FireFox.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

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