Jump to content
Sign in to follow this  


Recommended Posts

Trying to make something that will hold down the space bar while a certain area is blue and when its red the space bar is released. I see there is a command Send("{SPACE down}") which is exactly what I need, but the game I'm playing has gameguard. I have no problems sending keys with ControlSend however I don't see an option like with Send to hold down a key. Can someone enlighten me how I can make this work? Send doesn't work like ControlSend at least with 2moons and gameguard.

P.S. This is unfinished code.

; 1280x1024 [32]
; BLUE  0x3569B8
; RED   0xBC0000



    ControlSend("2Moons","","","{l}"); L START FISHING
    MouseClick("left"); CAST IN TO WATER

    $coord = PixelSearch (123, 142, 323, 148, 0x3569B8); CHECK FISH NOT FIGHT (BLUE)

    If not @error then
        ControlSend("2Moons","","","{SPACE down}"); REEL IN FISH
    ;Send("{SPACE down}")
    $coord = PixelSearch (123, 142, 323, 148, 0xBC0000); CHECK FISH FIGHTING (RED)

    If not @error then
        ControlSend("2Moons","","","{SPACE up}"); REEL IN FISH
    ;Send("{SPACE up}")
UNTIL $i = 2

Share this post

Link to post
Share on other sites

from the help file:

To hold a key down (generally only useful for games)

Send("{a down}") ;Holds the A key down

Send("{a up}") ;Releases the A key

Yes. As I stated, this works but NOT in 2moons with gameguard. I can only use ControlSend with success. But thanks anyway.

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  

  • Create New...