Jump to content

Dont stop


Xav
 Share

Recommended Posts

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
Link to comment
Share on other sites

  • Developers

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

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

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...