bvr Posted May 13, 2007 Posted May 13, 2007 (edited) I am getting this error with this little program I'm making when searching for hex colors. Error Parsing Function Callexpandcollapse popupFUNC MuleZone() Opt("MouseCoordMode", 0) MouseMove(105, 161) $coord = PixelSearch(161, 130, 163, 200, B54531,) If Not @error Then Send("{ENTER}") MouseClick("left", 375, 161) ELSE $coord = PixelSearch(161, 131, 167, 195, B54531,) If Not @error Then Send("{ENTER}") ELSE MouseClick("left", 103, 255) $coord = PixelSearch(255, 222, 263, 291, B54531,) If Not @error Then Send("{ENTER}") ELSE MouseClick("left", 368, 255) $coord = PixelSearch(255, 219, 260, 293, B54531,) If Not @error Then Send("{ENTER}") ELSE MouseClick("left", 98, 352) $coord = PixelSearch(352, 316, 353, 384, B54531,) If Not @error Then Send("{ENTER}") ELSE MouseClick("left", 376, 346) $coord = PixelSearch(346, 314, 350, 382, B54531,) If Not @error Then Send("{ENTER}") ELSE MouseClick("left", 98, 444) $coord = PixelSearch(444, 405, 444, 476, B54531,) If Not @error Then Send("{ENTER}") ELSE MouseClick("left", 372, 442) $coord = PixelSearch(442, 404, 446, 477, B54531,) If Not @error Then Send("{ENTER}") Else D2Quit() Endif EndIf EndIf EndIf EndIf EndIf EndIf EndIf EndFunc Edited May 13, 2007 by bmroyer
Rick Posted May 13, 2007 Posted May 13, 2007 probably the comma after B54531 Who needs puzzles when we have AutoIt!!
bvr Posted May 13, 2007 Author Posted May 13, 2007 I still get the error. It seems to be pointing at the hex color.
Helge Posted May 13, 2007 Posted May 13, 2007 Wrong :PixelSearch(161, 130, 163, 200, B54531,)oÝ÷ Ø*+ç-jëh×6PixelSearch(161, 130, 163, 200, 0xB54531)
bvr Posted May 13, 2007 Author Posted May 13, 2007 I am now having a problem with the ENTER key. I send text to the game, then I have to press enter to submit it. It only sends enter once. Then when it types the next text, it doesn't send enter. Do I have to add a ENTER UP function? Does is hold enter down or something and I have to send another function? I know i had to do that with the tab key. ;Anti-Idle's Your Character for Two Hours---- Func D2Idle() MouseMove(88, 504) Sleep(3000) MouseClick("left", 88, 504) Sleep(3000) MouseMove(580, 511) Sleep(60000) MouseClick("left", 580, 511) Sleep(3000) Send("MuleBuddy") Sleep(3000) Send("{ENTER}") Sleep(3000) Send("Visit Royersoft.com for support") Sleep(3000) Send("{ENTER}");end Sleep(60000);sleep for one minute Send("One Minute is Up...14 to go!") Sleep(3000) Send("{ENTER}");end Sleep(60000);sleep for one minute Send("Two Minutes Up...13 to go!") Sleep(6000)
SadBunny Posted May 13, 2007 Posted May 13, 2007 I am now having a problem with the ENTER key. I send text to the game, then I have to press enter to submit it. It only sends enter once. Then when it types the next text, it doesn't send enter. Do I have to add a ENTER UP function? Does is hold enter down or something and I have to send another function? I know i had to do that with the tab key.You might want to use Opt("SendKeyDownDelay",number) to increase the amount of miliseconds that a key is held down. As the help states and as I have often experienced, the default key press duration of 5 ms is often not long enough to get a game to register the keypress. Might want to try to set it to 50 or something (though for GTA San Andreas I couldn't get it to work reliably with less than 100 ms, experiment). Roses are FF0000, violets are 0000FF... All my base are belong to you.
PsaltyDS Posted May 14, 2007 Posted May 14, 2007 doesnt workdoesn't helpYou didn't even provide the whole function, since there is no EndFunc. You didn't show how the function was called. Nothing to go on... Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
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