Jump to content

Thread self cancellation


Debit
 Share

Recommended Posts

HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")

While 1
    $Paused
    $a = MouseGetPos()
    $COLOR = 0xFFFFFF
    $SHADES = 2
    If PixelSearch($a[0] - 10, $a[1] - 10, $a[0] + 10, $a[1] + 10, $COLOR, $SHADES) Then
    EndIf
    Sleep(1)
WEnd

Func TogglePause()
    $Paused = Not $Paused
    While $Paused
        Sleep(100)
    WEnd
EndFunc  ;==>TogglePause

Func Terminate()
    Exit 0
EndFunc  ;==>Terminate

change the color ofc, as for the window, I dont know, its not to hard to do that part manually is it?

Link to comment
Share on other sites

It's something of a devious use of AutoIt, and party to the kinds of programs that got AutoIt scripts marked as viruses by some Anti-virus software. I also, personally, don't appreciate it when people cheat at online games (I'm not assuming that you are going to use it online, but many do). If you aren't going to use it online more people will probably be willing to help.

Link to comment
Share on other sites

no there's 16,777,216 different pixel colors so red would be 0xFF0000. Anyways I think this is what your looking for

Global $Paused
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")

While 1
    $a = MouseGetPos()
    $Pixel = PixelSearch($a[0] - 10, $a[1] - 10, $a[0] + 10, $a[1] + 10, 0xFF0000, 10)
    If Not @error Then
        MsgBox(0,'','found')
    EndIf
    Sleep(10)
WEnd

Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        sleep(50)
    WEnd
EndFunc

Func Terminate()
    Exit
EndFunc

I found where you got the $paused = not $paused so I guess I was wrong about that.

Link to comment
Share on other sites

Sorry for the bad code I was tired :).

HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")
Global $Paused
Global $COLOR = 0xFF0000
Global $SHADES = 2


While 1
      $Coord = PixelSearch(0, 0, @DesktopWidth, @DesktopHeight, $COLOR, $SHADES)
      Sleep( 100 )
      If Not @error Then
         MouseClick("Left", $Coord[0], $Coord[1], 1, 1)
      EndIf
WEnd

Func TogglePause()
     $Paused = Not $Paused
    While $Paused
        Sleep(100)
    WEnd
EndFunc  ;==>TogglePause

Func Terminate()
    Exit 0
EndFunc  ;==>Terminate

As for opening the exe, I'm pretty sure talk of that subject is forbidden, botting and getting around are two different things. To find the color, use the autoit window info tool.

Edited by IKilledBambi
Link to comment
Share on other sites

As for opening the exe, I'm pretty sure talk of that subject is forbidden,

???? Im not sure I understand , I thought he just wanted to start the program?

The Run command is what your looking for to start the game, you just need to call the Executable for the game, and get the syntax correct. It should be something like this. If you checkout the Help file it explains it very well.

Run("Au3Info.exe","C:\Program Files\AutoIt3")

There is always a butthead in the crowd, no matter how hard one tries to keep them out.......Volly

Link to comment
Share on other sites

I set it up as so.

Run("CombatArms","")

And it did not work.

And it won't in the future either. READ THE HELP FILE (Run(), RunWait().

Run("C:\Nexon\Combat Arms\CombatArms.exe", "C:\Nexon\Combat Arms\")

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

Thank you.

I've been all through the help file and learned a lot.

But its not easy to follow some of it :)

The help file is very clear on the fact that the first parameter of the Run() command is the path and file name of the executable. The only time you can leave out the path is when the folder containing the executable is in the Path environment, for example Notepad.exe

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

How did this get to 43 responses?

You should quit bumping it so frequently, just because you want it to be looked at doesn't necessarily mean it has to be the 1st post of the 1st page.

It's a variation of the old "Lets raise my post count" theme.

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

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...