XreZerv Posted February 17, 2008 Share Posted February 17, 2008 (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 February 17, 2008 by XreZerv Link to comment Share on other sites More sharing options...
bogQ Posted February 17, 2008 Share Posted February 17, 2008 (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 February 17, 2008 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) 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. Link to comment Share on other sites More sharing options...
XreZerv Posted February 17, 2008 Author Share Posted February 17, 2008 (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 February 17, 2008 by XreZerv Link to comment Share on other sites More sharing options...
bogQ Posted February 17, 2008 Share Posted February 17, 2008 (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 February 17, 2008 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) 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. Link to comment Share on other sites More sharing options...
XreZerv Posted February 17, 2008 Author Share Posted February 17, 2008 Yes ! Thnx ) Link to comment Share on other sites More sharing options...
XreZerv Posted February 17, 2008 Author Share Posted February 17, 2008 (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 February 17, 2008 by XreZerv Link to comment Share on other sites More sharing options...
bogQ Posted February 17, 2008 Share Posted February 17, 2008 (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 February 17, 2008 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) 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. Link to comment Share on other sites More sharing options...
James Posted February 17, 2008 Share Posted February 17, 2008 Try using For Next loop. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
XreZerv Posted February 17, 2008 Author Share Posted February 17, 2008 thnx bogQ thnx for your help.. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now