
implite
Active Members-
Posts
28 -
Joined
-
Last visited
Everything posted by implite
-
Thanks, that fixed the error but it is still not finding the color im looking for so it will send the g key. maybe im going about this all wrong?
-
Im still new at this and trying to understand some things so all help is welcome! Thanks in advance!!! When I start the exe of this script I get this message. Dim $Pixelgray = "Ox4A494A" Dim $Getpixel HotKeySet("{HOME}", "GStart") HotKeySet("{ESC}", "Gexit") While 1 Sleep(100) WEnd Func Gstart() ;<---- this is where my line 13 is. Sleep(300) $Getpixel = PixelSearch(361, 197, 367, 196, 0x4A494A, 10) If Not @error Then Gexit() else If $Getpixel = $Pixelgray Then Send("g") EndIf EndFunc ;==>Gstart Func Gexit() MsgBox(0, "exit box", "Script exited") Exit 0 EndFunc ;==>Gexit can anyone explain to me what im doing wrong?
-
It keeps giving me errors on my wend sleep line. When home key is pressed then errors out. HotKeySet("{HOME}", "GStart") HotKeySet("{PAUSE}", "Gpause") HotKeySet("{ESC}", "Gexit") While 1 Sleep(100) WEnd ;this is where it is saying the problem is but I don't understand why... Func Gstart() While 1 $Pixelgray = Ox4A494A $Getpixel = PixelGetColor(363, 197) If $Getpixel = $Pixelgray Then Sleep(300) Send("g") EndIf WEnd EndFunc ;==>Gstart Func Gpause() While 1 Sleep(100) WEnd EndFunc ;==>Gpause Func Gexit() MsgBox(0, "exit box", "Script exited") Exit 0 EndFunc ;==>Gexit
-
$life = PixelSearch(53,540,65,547,0x890000,25) If Not $life = "0x890000" Then Gleave() Solved my own problem, lol forgot the "quotes"... cool.
-
can I do? if not $life = 0x890000 then gleave() is this possible?
-
I know how to use pixelsearch. I dont know how to use if not statements on here or true false tables, any examples please?
-
Im trying to make a simple chicken for if my life gets to low leave game. (diablo2) so im trying to do if not this color then goto my leave function. Any helpful tips would be nice. Thanks $life = PixelSearch(53,540,65,547,0x890000,50) if not $life = 0x890000 then Gleave() EndIf
-
added it into my pause script and it did the trick, Thanks
-
I have the letter 'e' as a hoykey and I want to be able to pause this hot key so I can type if needed using the e key. How can I turn on and off this hoykey in my script using HotKeySet?
-
thanks
-
Can tooltip display variables? This is what im trying to do but it wont display the number: Func Gstart() While 1 if PixelGetColor(20,20) = 16777215 then $Gcount = $Gcount + 1 Gpause() EndIf Wend Endfunc Func Gpause() While 1 ToolTip("Total = $Gcount", 677,175, "Paused") sleep(100) Wend Endfunc I want it to show: Paused Total = 1 but it shows Total = $Gcount it would be great if it can keep counting up every time it adds + 1 Thanks!
-
Thanks worked good. now looking how to make the mouse movements more natural with curves not straight lines from point a to point b.
-
Is there a way to move the mouse inside of 2 coordinates from top left to bottom right and end up inside this box randomly? ill show you im working on for example: HotKeySet("{HOME}", "GStart") HotKeySet("{PAUSE}", "Gpause") HotKeySet("{ESC}", "Gexit") while 1 sleep(100) WEnd Func Gstart() While 1 sleep(300) PixelSearch(476,189,513,196,0xE03131,25) If not @error Then MouseMove(499,260) EndIf if PixelGetColor(476,189) = 16777215 then Gmoveback() EndIf Wend Endfunc Func Gmoveback() While 1 MouseMove(506,239) sleep(300) $var = 1 if $var = 1 then Gstart() EndIf Wend Endfunc Func Gpause() While 1 sleep(100) Wend Endfunc Func Gexit() MsgBox(0, "exit box", "Script exited") Exit 0 EndFunc Instead of MouseMove(499,260), move mouse to anywheres inside {topleft (475,239), bottom right(569,249)} but, randomly... I would like to do this for MouseMove(506,239) too inside a area randomly... How do i do this?
-
Like if this pixel found scan for the next door neighbors pixel from left to right like the very next pixel must be there on the same latitude, if its not continue scanning the screen for a match. Lol, This topic can be closed. If I ever get around to coding something like this ill post it in the Example Scripts. I thought I saw something done in c++ like this before but not really sure. If this was ever done before please lead me the way.
-
Yep find it in a browser, game or any game/ onscreen display. Not like reading text from a .txt file but just finding it in coordinates and then perform an action. Edit: Can I take a screenshot of the Pattern I am looking and have autoit look for that pattern in my picture and compare till it finds a match?
-
Can I have Autoit find letters or a line of text like using pixel search? example ( search(132,193,647,342,findthistext, ) Is this possible?
-
yeah im a noob... Dont know why but it doesn't give me an error, even though its in there. Also when Take this out like this: Func Gstart() While 1 sleep(5000) $coord = PixelSearch(444,421,609,481,0xffff3f,1) mouseclick("left" ,$coord[0], $coord[1], 2, 0) sleep(500) MouseDown("left") MouseUp("left") sleep(500) MouseDown("left") MouseUp("left") if PixelGetColor(525,452) = 14869218 then GLast() EndIf Wend Endfunc I get this error: This all is a learning process. I think you all where here as where I am at one point before you got Godly Share the love, lol...
-
This is working great now. But, I still need some help/ideas so I dont need to use: $mystart = 0 if $mystart = 0 then Gstart()For it to loop back to Gstart() Other than that this is working great and soon I will be adding more stuff so the user doesn't need to hit the down arrow 8 times and also must not be using extra toolbars in opera before starting it. I am also trying to understand why PixelGetColor locks up the script if im using it more than once in other functions, Hence the learning curve... Anyways the website is http://www.grab.com/games/play-serfs-up give it a try let me know what you think or how I can improve this. Thanks again all!!! ; This is for the game serfs up found at http://www.grab.com/games/play-serfs-up ; Hit the down arrow 8 times to get the bot lined up with all the buttons then start the script also must not be using extra toolbars in opera Opt("WinWaitDelay",100) Opt("WinTitleMatchMode",4) Opt("WinDetectHiddenText",1) Opt("MouseCoordMode",0) WinWait("Free Serf's Up - Play Now - Opera","Free Serf's Up - Pla") If Not WinActive("Free Serf's Up - Play Now - Opera","Free Serf's Up - Pla") Then WinActivate("Free Serf's Up - Play Now - Opera","Free Serf's Up - Pla") WinWaitActive("Free Serf's Up - Play Now - Opera","Free Serf's Up - Pla") MsgBox(0, "Serfs Up Bot", "hit the Home key to start the script and ESC key to stop the script ") HotKeySet("{HOME}", "GStart") HotKeySet("{ESC}", "Gexit") while 1 sleep(100) WEnd Func Gstart() While 1 sleep(5000) $coord = PixelSearch(444,421,609,481,0xffff3f,1) If Not @error Then mouseclick("left" ,$coord[0], $coord[1], 2, 0) sleep(500) MouseDown("left") MouseUp("left") sleep(500) MouseDown("left") MouseUp("left") EndIf if PixelGetColor(525,452) = 14869218 then GLast() EndIf Wend Endfunc Func GLast() MouseMove(360,541) MouseDown("left") MouseUp("left") MouseMove(525,452) MouseDown("left") MouseUp("left") sleep(500) MouseDown("left") MouseUp("left") $mystart = 0 if $mystart = 0 then Gstart() Endfunc Func Gexit() MsgBox(0, "Serfs Up Bot", "Script has ended") Exit 0 EndFunc
-
lol I think adding in a hoykey for exit at this point would be good because I almost had to hard reset my computer to get out of this script... lol, I couldn't click the exit key cause the bot was going
-
Very nice mike, looks like it clicks on one of them every time you hit the start bot button, now. Canasain do mind if I play with this code to help me learn pixelsearch? Im kinda noobish...
-
Func Gstart() $mystart = 0 do sleep(2000) $var = PixelGetColor(525,452) Until $var = 14869218 or $var = 16777023 if $var = 14869218 then GLast() EndIf if $var = 16777023 then Gfirst() EndIf Endfunc This kinda works but gets stuck somewhere... any ideas how to maker this work better?
-
Thank you everyone for the input you gave me! I am really making allot of progress here for only starting. Not really sure why but this one works the best atm: Opt("WinWaitDelay",100) Opt("WinTitleMatchMode",4) Opt("WinDetectHiddenText",1) Opt("MouseCoordMode",0) WinWait("Free Serf's Up - Play Now - Opera","Free Serf's Up - Pla") If Not WinActive("Free Serf's Up - Play Now - Opera","Free Serf's Up - Pla") Then WinActivate("Free Serf's Up - Play Now - Opera","Free Serf's Up - Pla") WinWaitActive("Free Serf's Up - Play Now - Opera","Free Serf's Up - Pla") HotKeySet("{HOME}", "GStart") HotKeySet("{ESC}", "Gexit") while 1 sleep(100) WEnd Func Gstart() While 1 sleep(1000) $var = PixelGetColor(525,452) if $var = 14869218 then GLast() else Gfirst() EndIf Wend Endfunc Func Gfirst() MouseMove(525,452) MouseDown("left") MouseUp("left") sleep(500) MouseDown("left") MouseUp("left") sleep(500) MouseDown("left") MouseUp("left") $mystart = 0 if $mystart = 0 then Gstart() EndFunc Func GLast() MouseMove(360,541) MouseDown("left") MouseUp("left") $mystart = 0 if $mystart = 0 then Gstart() Endfunc Func Gexit() Exit 0 EndFunc If i use pixelgetcolor like this then i get errors: Func Gstart() While 1 sleep(1000) $var = PixelGetColor(525,452) if $var = 14869218 then GLast() elseif $var = 14869218 then Gfirst() EndIf Wend Endfunc Still looking for ideas on how to make this work the same way I have but Possibly without using: $mystart = 0 if $mystart = 0 then Gstart()To make it loop
-
Wow, this is what I came up with so far but, I still want it to continue with out needing me to hit the home key, it would be better if I could hit the home key once and then it will loop on its own with out me hitting it again. Opt("WinWaitDelay",100) Opt("WinTitleMatchMode",4) Opt("WinDetectHiddenText",1) Opt("MouseCoordMode",0) WinWait("Free Serf's Up - Play Now - Opera","Free Serf's Up - Pla") If Not WinActive("Free Serf's Up - Play Now - Opera","Free Serf's Up - Pla") Then WinActivate("Free Serf's Up - Play Now - Opera","Free Serf's Up - Pla") WinWaitActive("Free Serf's Up - Play Now - Opera","Free Serf's Up - Pla") HotKeySet("{HOME}", "GStart") HotKeySet("{ESC}", "Gexit") While 1 Wend Func Gstart() MouseMove(525,452) MouseDown("left") MouseUp("left") sleep(500) MouseDown("left") MouseUp("left") sleep(500) MouseDown("left") MouseUp("left") $var = PixelGetColor(525,452) if $var = 14869218 then GLast() elseif $var = 16777023 then Gstart() EndIf Endfunc Func GLast() MouseMove(360,541) MouseDown("left") MouseUp("left") Endfunc Func Gexit() Exit 0 EndFunc
-
Thats cool but only restarts when I hit the home key and is not much different from what I have. I would like it to continue looping on its own but only when Pixelsearch finds 0xffff3f or 0xE2E2E2 and as you can see i have no idea how to do this. note: I want only want these 3 functions and cut the rest. I dont think i even need sleep(20000) cause I Only want these functions called when pixelsearch finds at least one of these colors (0xffff3f or 0xE2E2E2) 0xffff3f Func Gstart() MouseMove(525,452) MouseDown("left") MouseUp("left") sleep(500) MouseDown("left") MouseUp("left") sleep(500) MouseDown("left") MouseUp("left") Endfunc I need to make this one yet: 0xE2E2E2 Func GLast() MouseMove(360,541) MouseDown("left") MouseUp("left") Endfunc Func Gexit() Exit 0 EndFunc
-
I am a noob but found out that I can make loops like this first add this at the top: $pixelloop = 0 Then make this a function like: Func Pixel4() $Pixel4 = PixelSearch(428, 770, 428, 770, 0x0161C3,1); check if can is full, if yes move home; Sleep("100") Endfunc Put this part where ever you want the loop to start: $pixelloop = 1 if $pixelloop = 1 then Pixel4() I hope this helps. Im still trying to learn how to use PixelSearch. Maybe you can send me a pm or post in my topic on how to use it.