AzKay Posted September 2, 2006 Share Posted September 2, 2006 Func _Fish() ;HotKeySet("{F3}") ;If $TimeOfDay = Dec("0B205A" or Dec("") Then MouseClick("Left", 708, 477, 1) Sleep(850) MouseClick("Left", 708, 477, 1) While 1;Do If $OnHook = Dec("2364B4") Then $PixelSearch = PixelSearch(643, 448, 770, 600, 0x9A3B3B, 30) If Not @error Then If $PixelSearch[0] > $Center Then MouseMove(304, $PixelSearch[1], 1) ElseIf $PixelSearch[0] < $Center Then MouseMove(982, $PixelSearch[1], 1) EndIf EndIf EndIf WEnd ;Until $Missed = Dec("DB1A1A") Or $Caught = Dec("EF3612") ;HotKeySet("{F3}", "_Fish") ;Else ;MsgBox(0, "Error", "Error: This bot will ONLY work in the day time. Or the night time. NOT at dusk or dawn.") ;EndIf EndFunc This isnt all my code, but I dont think the rest matters. Anyway. Im wanting that section up there, in a Do...Until, But, it doesnt work. It only wants to "function" when its using while...wend. I dont get any errors, it just, ignores that section. Any ideas? # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
xcal Posted September 2, 2006 Share Posted September 2, 2006 I'm not sure about the problem, but you could add in this for the While 1 loop. If $Missed = Dec("DB1A1A") Or $Caught = Dec("EF3612") Then ExitLoop How To Ask Questions The Smart Way Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 2, 2006 Moderators Share Posted September 2, 2006 (edited) Func _Fish() ;HotKeySet("{F3}") ;If $TimeOfDay = Dec("0B205A" or Dec("") Then MouseClick("Left", 708, 477, 1) Sleep(850) MouseClick("Left", 708, 477, 1) While 1;Do If $OnHook = Dec("2364B4") Then $PixelSearch = PixelSearch(643, 448, 770, 600, 0x9A3B3B, 30) If Not @error Then If $PixelSearch[0] > $Center Then MouseMove(304, $PixelSearch[1], 1) ElseIf $PixelSearch[0] < $Center Then MouseMove(982, $PixelSearch[1], 1) EndIf EndIf EndIf WEnd ;Until $Missed = Dec("DB1A1A") Or $Caught = Dec("EF3612") ;HotKeySet("{F3}", "_Fish") ;Else ;MsgBox(0, "Error", "Error: This bot will ONLY work in the day time. Or the night time. NOT at dusk or dawn.") ;EndIf EndFunc This isnt all my code, but I dont think the rest matters. Anyway. Im wanting that section up there, in a Do...Until, But, it doesnt work. It only wants to "function" when its using while...wend. I dont get any errors, it just, ignores that section. Any ideas?Your do until is conditional unlike your While/Wend you've posted... It's not going to loop if $missed never = Dec("DB1A1A") or if $caught never = Dec("EF3612")... Probably just a poor design on your part. To test that it does work... put Until 1 = 2 ... then fix your conditions. Edited September 2, 2006 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
AzKay Posted September 2, 2006 Author Share Posted September 2, 2006 Your do until is conditional unlike your While/Wend you've posted... It's not going to loop if $missed never = Dec("DB1A1A") or if $caught never = Dec("EF3612")... Probably just a poor design on your part. To test that it does work... put Until 1 = 2 ... then fix your conditions.Yeah, I didnt post my whole script. Func _OnHook() $OnHook = PixelGetColor(702, 458) $Caught = PixelGetColor(739, 383) $Missed = PixelGetColor(722, 417) $TimeOfDay = PixelGetColor(305, 168) EndFunc oÝ÷ Ù«¢+Ø(¥¹±Õ±ÐíU% ½¹ÍѹÑ̹ÔÌÐì(¥¹±Õ±ÐíAɽÍ̹ÔÌÐì)!½Ñ-åMÐ ÅÕ½ÐííÉôÅÕ½Ðì°ÅÕ½Ðí}M¡½ÝMÁ½ÑÌÅÕ½Ðì¤)!½Ñ-åMÐ ÅÕ½ÐííÍôÅÕ½Ðì°ÅÕ½Ðí}¥Í ÅÕ½Ðì¤)=ÁÐ ÅÕ½ÐíU%=¹Ù¹Ñ5½ÅÕ½Ðì°Ä¤)=ÁÐ ÅÕ½Ðí]¥¹Q¥Ñ±5Ñ¡5½ÅÕ½Ðì°È¤)=ÁÐ ÅÕ½ÐíA¥á± ½=É5½ÅÕ½Ðì°À¤)±¥¹± ÅÕ½Ðí}=¹!½½¬ÅÕ½Ðì¤)¥´ÀÌØí=¹!½½¬)¥´ÀÌØí Õ¡Ð)¥´ÀÌØí5¥ÍÍ)¥´ÀÌØíQ¥µ=ä(ÀÌØí ¹ÑÈôØäÜ( # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 2, 2006 Moderators Share Posted September 2, 2006 You didn't have to show the entire thing... you're issue is as I stated above. You're While/WEnd loop looks like it's doing something different than what you had originally than your Do/Until one anyway. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
AzKay Posted September 2, 2006 Author Share Posted September 2, 2006 You didn't have to show the entire thing... you're issue is as I stated above. You're While/WEnd loop looks like it's doing something different than what you had originally than your Do/Until one anyway.Has anyone told you your very intimidating? # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
Developers Jos Posted September 2, 2006 Developers Share Posted September 2, 2006 Has anyone told you your very intimidating?Facts can be intimidating but they are still fact .... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. 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