Jump to content

Trying to send clicks to a D3D app


Recommended Posts

Hi Guys,

This will probably be very simple to solve if solvable. I'm trying to send some clicks to a 3D game "Last Chaos" and the clicks do not register in the application. The mouse doesn't move either. I've noticed the mouse does move and the clicks are sent to *other windows* but just not this game window.

Here's a bit of what I am working on. Any advice would be most appreciated.

while 1     
   $coord = PixelSearch(0,0,1024,768,$BlueMob)
    $n = @error
    if $n = 1 then 
        Sleep(1000)
    Else
        Beep(5000, 100); found enemy
        $notfound = 1
        $clickcount = 0
        While $notfound
            $x = Random($coord[0], $coord[0]+35, 1) ; click not the name, but the actual monster
            $y = Random($coord[1], $coord[1]+35, 1)
            
            Sleep(100);
                        MouseClick("left", $x, $y, 2, 10); attack the mob       
            $clickcount = $clickcount + 1
            $test = PixelGetColor(567,43); is the health bar up?
            if $test = 0x4c2423 Then $notfound = 0; if yes exit loop as auto attack is set
            if $clickcount >= 10 Then
                Beep(500, 100); "couldn't click enemy"
                $clickcount = 0
                Exitloop 1
            EndIf
            sleep(100)
        WEnd
        sleep(10000);wait 10 seconds
    EndIf
Wend
Link to comment
Share on other sites

Oh so it means that ur script needed admin right to execute..

By any chance u using Vista?? :) very irritating OS it is.. if u ask me..

[font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com
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...