Xav Posted January 10, 2008 Share Posted January 10, 2008 (edited) How can it hold on and when i want i click (7) and comencing search all .5 sec ? Becose when i run this it quit right after ...? :S Whats the function ?---------------------- HotKeySet("7" ,"Owned") Func owned() $Game = NOT $Game If $Game Then ToolTip('Press (F9) to Exit Game Bot',0,0) While $Game $Head1 = PixelSearch( 1,1,1023,767, 0x7B7542 ) If IsArray($Coord) Then MouseClick("Left",$head1[0], $head1[1],1,0) $Head2 = PixelSearch( 1,1,1023,767, 0x212410 ) If IsArray($Coord) Then MouseClick("Left",$head2[0], $head2[1],1,0) WEnd ToolTip("") EndFunc Edited January 10, 2008 by Xav Link to comment Share on other sites More sharing options...
Developers Jos Posted January 10, 2008 Developers Share Posted January 10, 2008 thats because you never call the func ... and there is only one statement to execute before the end of the scriptlines to execute. 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...
Xav Posted January 10, 2008 Author Share Posted January 10, 2008 (edited) Only reapet if thats not long ? Edited January 10, 2008 by Xav Link to comment Share on other sites More sharing options...
BrettF Posted January 10, 2008 Share Posted January 10, 2008 You need to add a While loop with a sleep (10) in it, just before the func declaration.... Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
GEOSoft Posted January 10, 2008 Share Posted January 10, 2008 Only reapet if thats not long ?Try this. You were using IsArray to check the wrong array so If IsArray($Coord) would never return 1. In fact I'm surprided it didn't error out with "Undeclared Variable $Coord" unless you had it declared someplace else. HotKeySet("7" ,"Owned") Func owned() $Game = NOT $Game If $Game Then ToolTip('Press (F9) to Exit Game Bot',0,0) While $Game $Head1 = PixelSearch( 1,1,1023,767, 0x7B7542 ) If IsArray($Head1) Then MouseClick("Left",$head1[0], $head1[1],1,0) $Head2 = PixelSearch( 1,1,1023,767, 0x212410 ) If IsArray($Head2) Then MouseClick("Left",$head2[0], $head2[1],1,0) WEnd ToolTip("") EndFunc George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
Xav Posted January 10, 2008 Author Share Posted January 10, 2008 Thanks xD i need like key to active and like the script hold and reapat all of the time and when i want to close i click back on the key it's what i want look like HotKeySet("7" ,"Owned") Func owned() Sleep(10) $Game = NOT $Game If $Game Then ToolTip('Press (F9) to Exit Game Bot',0,0) While $Game $Head1 = PixelSearch( 1,1,1023,767, 0x7B7542 ) If IsArray($Head1) Then MouseClick("Left",$head1[0], $head1[1],1,0) $Head2 = PixelSearch( 1,1,1023,767, 0x212410 ) If IsArray($Head2) Then MouseClick("Left",$head2[0], $head2[1],1,0) WEnd ToolTip("") EndFunc Link to comment Share on other sites More sharing options...
Xav Posted January 11, 2008 Author Share Posted January 11, 2008 ne1 know its ezz i think ? 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