Jump to content

Recommended Posts

Posted

If you cannot help me with This very question below..

DO NOT POST.

I'm sick of hearing crap.

Don't spam my thread.

Make it at least a little helpful.

Currently I need a script the does the following.

__________________________________________________________________

1. When ran, it doesn't automatically start, its paused. |

2. Will Alt+Tab into "CombatArms" |

3. Allow me to pause and unpause the script in-game. |

4. When I press a key it unpauses. |

5. When Unpaused it finds the closest "$COLOR = 0xFF0000" and locks onto it. |

6. I will then do the clicking and unpause the script where it shall let loose. |

----------------------------------------------------------------------------------------------

I currently have this script.

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

A few problems!

_____________

1. It starts unpaused.

2. It clicks when it shouldn't click at all.

3. It doesn't lock on, there could be several "$COLOR = 0xFF0000" around the screen, I need it to pick the closest one and stick to it.

4. It does nothing in the application "CombatArms".

5. I have no idea what I'm doing.

Posted (edited)

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

[b]TogglePause()[/b]
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

That should turn pause on when the script runs, when you unpause it will enter the loop and never hit that first TogglePause() again until you restart the script.

Also look up the winactivate funcion in the autoit help file, you can use that to activate any window based on its name (put it before TogglePause() so it activates the window, then pauses until your ready to run the script).

EDIT: Oh, as for pausing/unpausing, you would simply use the PAUSE button as defined by HotKeySet("{PAUSE}", "TogglePause")......with it starting paused, the first push of Pause will unpause it, the next push will Pause it, etc.

Edited by mwpeck
Posted

Tell you what.

I give up because I looked into it a little more and autoit isn't going to work for combat arms..

Winactive does nothing for it.

Not sure why, but it doesn't.

I had a friend help me out, got it working in WoW with the same script but Combat arms will not allow Autoit to run at the same time.

Even with a Hackshield bypass.

Posted

I won't contribute with any code, but I'll tell you what:

I think AutoIt is what you're looking for and that you need to read up on several commands regarding this, how about starting with an easier project? Also, you don't need to set up rules regarding this specific thread, just makes you look like a fool. How about your appreciate the help you get from people?

Posted (edited)

I won't contribute with any code, but I'll tell you what:

I think AutoIt is what you're looking for and that you need to read up on several commands regarding this, how about starting with an easier project? Also, you don't need to set up rules regarding this specific thread, just makes you look like a fool. How about your appreciate the help you get from people?

I enjoy the fact that you at the very least used some thought into your post..

But if you had looked into my previous thread 90% of what you just typed up would have not even have come to your mind.

But I digress.

AutoIt Is not what I'm looking for.

Edited by Debit

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
  • Recently Browsing   0 members

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