lolifox Posted June 29, 2008 Share Posted June 29, 2008 Hi. Im new here and at autoit scripting, soo i decided to start with simple (well i thought it would be simple) commands, but reading some manuals examples went to nowhere. Well basicly i want just that script enters some url's with IF commands, and should wait 4 seconds after opening link, mkey ill explain with more details, this site has pet growing game like in first screen so as you see in that screen first i need to enter in map, so i just use http://www.l2021.com/bbs/pet.php?index=petpknpc&mapid=3 (1) , so as i enter in map i need enter next url http://www.l2021.com/bbs/pet.php?index=pet...action=fightnpc (2) and repeat it till i get text like (The monster is dead, search another one), then enter (1) url and then keep entering (2) till get (The monster is dead, search another one) and do the same thing over and over, except IF on the opened window there is text like (patrolling) click (F5 - refresh), sooo i hope you didnt droped it already and heres is the somethin i maked :/WinWaitActive("Take easy, Keep your eyes be relax - Mozilla Firefox") ShellExecute("http://www.l2021.com/bbs/pet.php?index=petpknpc&mapid=3") If text ("A monster frowns on you and start to attack. or A monster frowns on you and start to attack.") Then ShellExecute(http://www.l2021.com/bbs/pet.php?index=petpknpc&action=fightnpc") Repeat it till get text ("The monster is dead, search another one") If text ("patrolling") Send("F5") If text ("This monster is dead!") Send("F5")P.S if you have more questions please to write them Link to comment Share on other sites More sharing options...
lolifox Posted June 30, 2008 Author Share Posted June 30, 2008 in other words i just need to know the IF probability like ex.: if there is text do that, ill handle other codes (well will try ) Link to comment Share on other sites More sharing options...
Kiti Posted June 30, 2008 Share Posted June 30, 2008 (edited) You should have something like: $x = pixelgetcolor(;the coordinates of a point IN the text) If $x = 0x000000 Then ;colour black => the text appeared ;Do this: Else if $x = colour white Then ;The text didn't appeared, and do this EndIf It's a rough example, because my internet sucks so I couldn't open your link. Just set the coordinates and the color of text/background . Cheers! Edited June 30, 2008 by Kiti Think outside the box.My Cool Lego Technic Website -- see walking bipeds and much more!My YouTube account -- see cool physics experimentsMy scripts:Minesweeper bot: Solves advanced level in 1 second (no registry edit), very improved GUI, 4 solving stylesCan't go to the toilet because of your kids closing your unsaved important work? - Make a specific window uncloseableCock Shooter Bot -- 30 headshots out of 30 Link to comment Share on other sites More sharing options...
lolifox Posted July 1, 2008 Author Share Posted July 1, 2008 (edited) hmm i get error on coords :/ Opt("WinWaitDelay", 4000) Opt("WinTitleMatchMode", 4) WinWait("Take easy, Keep your eyes be relax - Mozilla Firefox","") WinWaitActive("Take easy, Keep your eyes be relax - Mozilla Firefox","") $Coord = pixelgetcolor(232, 250, 476, 446, 0xF5FBFF, 5 ) If $Coord = 0xF5FBFF Then Send("F5") EndIf i want it to triger then patroling text appear in that location and hit F5 Edited July 1, 2008 by lolifox Link to comment Share on other sites More sharing options...
lolifox Posted July 1, 2008 Author Share Posted July 1, 2008 well since no one replies, ill add another screen an example what i would like(maybe it seems very easy, but any help would be appreciated) Link to comment Share on other sites More sharing options...
Kiti Posted July 2, 2008 Share Posted July 2, 2008 hmm i get error on coords :/ Opt("WinWaitDelay", 4000) Opt("WinTitleMatchMode", 4) WinWait("Take easy, Keep your eyes be relax - Mozilla Firefox","") WinWaitActive("Take easy, Keep your eyes be relax - Mozilla Firefox","") $Coord = pixelgetcolor(232, 250, 476, 446, 0xF5FBFF, 5 ) If $Coord = 0xF5FBFF Then Send("F5") EndIf i want it to triger then patroling text appear in that location and hit F5 That's because you've used pixel get color in a wrong way (pixelsearch way). The correct syntax. You can find yourself the right way of doing it: Why do you need to specify the colour if the colour is what you need to find? It color drops. You can't get the color of an entire retangle, but just of a one single pixel => 2nd, 3rd and the step drops. The result is: $coord = pixelgetcolor(232,250) or whatever pixel is always changing when the text appears. If you change this, it will work fine. Cheers! Kiti Think outside the box.My Cool Lego Technic Website -- see walking bipeds and much more!My YouTube account -- see cool physics experimentsMy scripts:Minesweeper bot: Solves advanced level in 1 second (no registry edit), very improved GUI, 4 solving stylesCan't go to the toilet because of your kids closing your unsaved important work? - Make a specific window uncloseableCock Shooter Bot -- 30 headshots out of 30 Link to comment Share on other sites More sharing options...
nobbe Posted July 2, 2008 Share Posted July 2, 2008 well since no one replies, ill add another screen an example what i would likeyou should be using the _IE* functions to navigate through webpages -- usings firefox with pixelsearch etc : not really working at all : so thats why noone can help much 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