PcExpert Posted June 14, 2006 Share Posted June 14, 2006 This is the script that doesn't work: HotKeySet("{F1}", "begin") Sleep(9999999) func begin() WinWaitActive("Habbo ~ Habbo Hotel - ") Sleep(400) $x = 435 $y = 291 $Color = 0x313031 While 1 If PixelGetColor($x, $y) = NOT $Color Then exitloop sleep(10) Wend MyFunction() EndFunc Func MyFunction() MouseClick("left", 430, 284, 1) MouseClick("left", 827, 614, 1) EndFunc The problem is that this line doesn't work: If PixelGetColor($x, $y) = NOT $Color Then exitloop Link to comment Share on other sites More sharing options...
w0uter Posted June 14, 2006 Share Posted June 14, 2006 $Color = 0x313031 not $Color = 0 If PixelGetColor($x, $y) = 0 Then exitloop is this what you want ? My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
PcExpert Posted June 14, 2006 Author Share Posted June 14, 2006 (edited) Sorry, it works Edited June 14, 2006 by PcExpert Link to comment Share on other sites More sharing options...
w0uter Posted June 14, 2006 Share Posted June 14, 2006 use <> $color My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
PcExpert Posted June 14, 2006 Author Share Posted June 14, 2006 It doesn't work. (I was thinking that it was) Link to comment Share on other sites More sharing options...
w0uter Posted June 14, 2006 Share Posted June 14, 2006 are you sure pixelgetcolor is getting that color sometime ? try to write the result of each check to a file. My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
Bundy Posted June 14, 2006 Share Posted June 14, 2006 Sleep(9999999) is over 2 hours... Link to comment Share on other sites More sharing options...
PcExpert Posted June 14, 2006 Author Share Posted June 14, 2006 (edited) I know but you must activate the script with a hotkey The current code: HotKeySet("{F1}", "begin") Sleep(9999999) func begin() WinWaitActive("Habbo ~ Habbo Hotel - ") Sleep(400) $x = 437 $y = 326 $Color = 0x181818 While 1 If PixelGetColor($x, $y) = Not $Color Then ExitLoop sleep(10) Wend MyFunction() EndFunc Func MyFunction() MouseClick("left", 430, 330, 1) MouseClick("left", 821, 643, 1) EndFunc Edited June 14, 2006 by PcExpert Link to comment Share on other sites More sharing options...
w0uter Posted June 14, 2006 Share Posted June 14, 2006 (edited) HotKeySet("{F1}", "begin") While 1 Sleep(10) Wend func begin() WinWaitActive("Habbo ~ Habbo Hotel - ") Sleep(400) $x = 437 $y = 326 $Color = 0x181818 While PixelGetColor($x, $y) = $Color sleep(10) Wend MyFunction() EndFunc Func MyFunction() MouseClick("left", 430, 330, 1) MouseClick("left", 821, 643, 1) EndFunc Edited June 14, 2006 by w0uter My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
PcExpert Posted June 14, 2006 Author Share Posted June 14, 2006 (edited) This is the current code:HotKeySet("{F1}", "begin")While 1Sleep(10)Wendfunc begin()WinWaitActive("Habbo ~ Habbo Hotel - ")Sleep(400)$x = 437$y = 326$Color = 0x181818While PixelGetColor($x, $y) = $Colorsleep(10)WendMyFunction()EndFuncFunc MyFunction()MouseClick("left", 430, 330, 1)MouseClick("left", 821, 643, 1)EndFuncBut how to repeat the detection of the color? Edited June 14, 2006 by PcExpert Link to comment Share on other sites More sharing options...
w0uter Posted June 14, 2006 Share Posted June 14, 2006 you can put it in a while 1 loop if you just want to repeat it. My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll 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