Hey guys any help from the guy who knows .ahk?

This is a discussion on Hey guys any help from the guy who knows .ahk? within the General Chat board part of the General category; Hey guys, im using macro recorder to play time clickers Time Clickers on Steam And all i need is bunch ...

Results 1 to 4 of 4
  1. #1
    nekoneko is offline Advanced Hacker
    Array
    Join Date
    Nov 2011
    Location
    Your mom
    Posts
    245
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    6
    Reputation
    15

    Hey guys any help from the guy who knows .ahk?

    Hey guys, im using macro recorder to play time clickers
    Time Clickers on Steam
    And all i need is bunch of clicks and key press in the loop, i have a good macro (perfect for me) but the only problem i use jitbit macro recorder which cant make do everything if the window in the background, it looks like this

    Code:
    Mouse : 349 : 225 : LeftButtonDown : 0Mouse : 349 : 225 : LeftButtonUp : 0
    Keyboard : D : KeyDown
    Keyboard : D : KeyUp
    DELAY : 3
    Mouse : 330 : 178 : LeftButtonDown : 0
    Mouse : 330 : 178 : LeftButtonUp : 0
    Keyboard : F : KeyDown
    Keyboard : F : KeyUp
    DELAY : 3
    Mouse : 512 : 186 : LeftButtonDown : 0
    Mouse : 512 : 186 : LeftButtonUp : 0
    Keyboard : G : KeyDown
    Keyboard : G : KeyUp
    DELAY : 3
    Mouse : 530 : 150 : LeftButtonDown : 0
    I was trying couple of times to use auto-it to make same macro which will work in the background but the only thing i made is key press which worked in the foreground and mouse clicks didnt worked at all =\

    Can someone explain to me how to make ahk script which will do the same but with the game in the background?
    Short example of code with 1 click and 1 keypress would be the best, i can expand the rest by myself


  2. #2
    nekoneko is offline Advanced Hacker
    Array
    Join Date
    Nov 2011
    Location
    Your mom
    Posts
    245
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    6
    Reputation
    15

  3. #3
    DarkJesture's Avatar
    DarkJesture is offline That 1 guy...

    Array
    Join Date
    Mar 2012
    Location
    Salt Lake City, UT
    Posts
    1,317
    Mentioned
    113 Post(s)
    Tagged
    1 Thread(s)
    Rep Power
    7
    Reputation
    476
    I'm not sure you could do that with ahk



  4. #4
    Jussp's Avatar
    Jussp is offline Gangster Mod


    Array
    Join Date
    Feb 2010
    Location
    Sweden
    Posts
    668
    Mentioned
    26 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    9
    Reputation
    489
    So what you want to do is to be able to use the computer while running the ahk script?

    I'd say running it on a virtual machine would be your best shot.

    EDIT: After googling abit I found a old code from Insolence who was a Diablo II hacker. The code itself will send keystrokes and mouse click to a minimized window in AutoIt.


    Code:
     ;===============================================================================
      ;
      ; Function Name:  _MouseClickPlus()
      ; Version added:  0.1
      ; Description:    Sends a click to window, not entirely accurate, but works
      ;                 minimized.
      ; Parameter(s):   $Window     =  Title of the window to send click to
      ;                 $Button     =  "left" or "right" mouse button
      ;                 $X          =  X coordinate
      ;                 $Y          =  Y coordinate
      ;                 $Clicks     =  Number of clicks to send
      ;                 $Delay     = Delay in MS between system calls, seems to help with accuracy
      ; Remarks:        You MUST be in "MouseCoordMode" 0 to use this without bugs.
      ; Author(s):      Insolence <[email protected]>
      ;
      ;===============================================================================
    Func _MouseClickPlus($Window, $Button = "left", $X = "", $Y = "", $Clicks = 1, $Delay = 100)
        Local $MK_LBUTTON       =  0x0001
        Local $WM_LBUTTONDOWN   =  0x0201
        Local $WM_LBUTTONUP     =  0x0202
    
    
        Local $MK_RBUTTON       =  0x0002
        Local $WM_RBUTTONDOWN   =  0x0204
        Local $WM_RBUTTONUP     =  0x0205
    
    
        Local $WM_MOUSEMOVE     =  0x0200
    
    
        Local $i                = 0
    
    
        Select
        Case $Button = "left"
           $Button     =  $MK_LBUTTON
           $ButtonDown =  $WM_LBUTTONDOWN
           $ButtonUp   =  $WM_LBUTTONUP
        Case $Button = "right"
           $Button     =  $MK_RBUTTON
           $ButtonDown =  $WM_RBUTTONDOWN
           $ButtonUp   =  $WM_RBUTTONUP
        EndSelect
    
    
        If $X = "" OR $Y = "" Then
           $MouseCoord = MouseGetPos()
           $X = $MouseCoord[0]
           $Y = $MouseCoord[1]
        EndIf
    
    
        For $i = 1 to $Clicks
           DllCall("user32.dll", "int", "SendMessage", _
              "hwnd",  WinGetHandle( $Window ), _
              "int",   $WM_MOUSEMOVE, _
              "int",   0, _
              "long",  _MakeLong($X, $Y))
    
    
          Sleep($Delay)
    
    
           DllCall("user32.dll", "int", "SendMessage", _
              "hwnd",  WinGetHandle( $Window ), _
              "int",   $ButtonDown, _
              "int",   $Button, _
              "long",  _MakeLong($X, $Y))
    
    
          Sleep($Delay)
    
    
           DllCall("user32.dll", "int", "SendMessage", _
              "hwnd",  WinGetHandle( $Window ), _
              "int",   $ButtonUp, _
              "int",   $Button, _
              "long",  _MakeLong($X, $Y))
        Next
    EndFunc
    To send keystorkes to minimized window, just use the built in ControlSend.

    Code:
    ControlSend($title, "", "", "f")
    To get $title use:

    Code:
    $title = WinGetTitle("[CLASS:ArcheAge]", "")
    Source:[AutoIT] Sending keystrokes / mouse clicks to minimized ArcheAge window
    Last edited by Jussp; 10-22-2015 at 04:22 PM.


  5. The Following User Says Thank You to Jussp For This Useful Post:


Similar Threads

  1. Hi guys, do any of you guys play in Korea?
    By cowconnexion in forum Dota Forum
    Replies: 1
    Last Post: 05-20-2012, 03:30 AM
  2. Hey guys
    By TheBF3 in forum Say Hello
    Replies: 0
    Last Post: 03-14-2012, 12:21 PM
  3. Sup guys :)
    By vbvbvbvbvbvbvb in forum Say Hello
    Replies: 1
    Last Post: 03-10-2012, 11:18 AM
  4. hi guys~!#
    By upo in forum Say Hello
    Replies: 1
    Last Post: 03-08-2012, 01:42 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •