Sign in to follow this  
Followers 0
XreZerv

Sorry for this question... i'am the nwe one..

9 posts in this topic

#1 ·  Posted (edited)

I'am creating first my script now.. and have a problem.. look :

HotKeySet("{Enter}","Enchant")
While 1
sleep( 100 )
WEnd


Func Enchant()  
    If PixelGetColor(611,180)=0x101010 then A()                     
    If PixelGetColor(646,178)=0x101010 then B()                 
    If PixelGetColor(685,175)=0x101010 then C()                   
    If PixelGetColor(716,175)=0x101010 then D()                     
    If not PixelGetColor(716,175)=0x101010 then E()              
  Endfunc

What's wrong here? ( Func , endfunc)... I think you know what i want to do.. after that are going a lot of functions... Scritp just stops here .. then he shoud start another func.. And i want do one more thing.. like reapeat all my script like for 4 times or 6.. ( write a repeat number somwhere) how shoud i do this?

P.s. sorry for my en

Edited by XreZerv

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

I'am creating first my script now.. and have a problem.. look :

well probably you dident understand the Hex part of the pixel example.

Can you learn ti from this?

HotKeySet("{Enter}","Enchant")
While 1
WEnd

Func Enchant()
    Global $a = "0x"&Hex(PixelGetColor(611,180), 6)
    Global $b = "0x"&Hex(PixelGetColor(646,178), 6)
    Global $c = "0x"&Hex(PixelGetColor(685,175), 6)
    Global $d = "0x"&Hex(PixelGetColor(716,175), 6)
    Global $e = "0x"&Hex(PixelGetColor(716,175), 6)
    If $a = "0x101010" then A()
    If $b = "0x101010" then B()
    If $c = "0x101010" then C()
    If $d = "0x101010" then D()
    If $e <> "0x101010" then E()
Endfunc


Func A()
    MsgBox(0,"","A")
EndFunc
Func B()
    MsgBox(0,"","B")
EndFunc
Func C()
    MsgBox(0,"","C")
EndFunc
Func D()
    MsgBox(0,"","D")
EndFunc
Func E()
    MsgBox(0,"","E")
EndFunc

or you have nice example in the help file to get color like in windowinfo tool with pixegetcolor

$var = PixelGetColor( 10 , 100 )
MsgBox(0,"The decmial color is", $var)
MsgBox(0,"The hex color is", Hex($var, 6))
Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Thnx, i think it's working.. and i'am sory.. it is first days for my.. it's hard to understand all this stuff.. Maybe you know how to repeat all ?

Edited by XreZerv

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Thnx, i think it's working.. and i'am sory.. it is first days for my.. it's hard to understand all this stuff.. Maybe you know how to repeat all ?

Func Enchant()
    $reapeat = "1"
    Do
        $reapeat = $reapeat + 1
        Global $a = "0x"&Hex(PixelGetColor(611,180), 6)
        Global $b = "0x"&Hex(PixelGetColor(646,178), 6)
        Global $c = "0x"&Hex(PixelGetColor(685,175), 6)
        Global $d = "0x"&Hex(PixelGetColor(716,175), 6)
        Global $e = "0x"&Hex(PixelGetColor(716,175), 6)
        If $a = "0x101010" then A()
        If $b = "0x101010" then B()
        If $c = "0x101010" then C()
        If $d = "0x101010" then D()
        If $e <> "0x101010" then E()
    Until $reapeat > "5"; this will reapeat the function after enter 5 times
Endfunc

i hope that this is what your looking 4

Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Man... it's working not 5 times.. it's woking all time replaying and replaying... without stops :/ something need to change

Edit: A... my mistake.. i dididnt wrote dawn $reapeat = $reapeat + 1 line

Edit 2 : i write 2 and script do this ~7 times

Edit3 : i dont understand.. now it looks like all is ok :/

Edited by XreZerv

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Edit 2 : i write 2 and script do this ~7 times

HotKeySet("{Enter}","Enchant")
While 1
WEnd

Func Enchant()
    $reapeat = "1"
    Do
        $reapeat = $reapeat + 1
        Global $a = "0x"&Hex(PixelGetColor(611,180), 6)
        Global $b = "0x"&Hex(PixelGetColor(646,178), 6)
        Global $c = "0x"&Hex(PixelGetColor(685,175), 6)
        Global $d = "0x"&Hex(PixelGetColor(716,175), 6)
        Global $e = "0x"&Hex(PixelGetColor(716,175), 6)
        If $a = "0x101010" then A()
        If $b = "0x101010" then B()
        If $c = "0x101010" then C()
        If $d = "0x101010" then D()
        If $e <> "0x101010" then E()
    Until $reapeat > "2"; this will reapeat the function after enter 5 times  <edit this to 2 or to how many times you need to go
Endfunc

Func A()
    MsgBox(0,"","A")
EndFunc
Func B()
    MsgBox(0,"","B")
EndFunc
Func C()
    MsgBox(0,"","C")
EndFunc
Func D()
    MsgBox(0,"","D")
EndFunc
Func E()
    MsgBox(0,"","E")
EndFunc

Until $reapeat > "5"; this will reapeat the function after enter 5 times <edit this to 2 or to how many times you need to go and dont edit other lines :)

edit: and dont try to hit enter key more then 1 time :) if you need to click ok button use your mouse :)

Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites

thnx bogQ :) thnx for your help..

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