Jump to content
Sign in to follow this  
Xav

Dont stop

Recommended Posts

Xav

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 by Xav

Share this post


Link to post
Share on other sites
Jos

thats because you never call the func ... and there is only one statement to execute before the end of the scriptlines to execute.


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Xav

Only reapet if thats not long ?

Edited by Xav

Share this post


Link to post
Share on other sites
BrettF
GEOSoft

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!"

Share this post


Link to post
Share on other sites
Xav

Thanks xD i need like key to active :P 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

Share this post


Link to post
Share on other sites
Xav

ne1 know its ezz i think ? :)

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×