Tailor Made Tools/Programs for You - AHK

11/24/2009 19:10 Evan Lim#946
hecavante@
the following will not work in background mode as background send keystrokes doesnt work
Code:
SetKeyDelay,0,100
Gui, Add, Checkbox, vC glabel, Checkbox
Gui, Add, Edit, r1 vS w200, Text 
Gui, Show
return
GuiClose:
exitapp
return
label:
Gui, Submit, NoHide
if C = 1
settimer, function, 2000
else
settimer, function, off
return
function:
IfWinNotActive, [C
return
send {enter}
send %S%
send {enter}
return
11/24/2009 19:34 hecavante#947
Quote:
Originally Posted by Evan Lim View Post
hecavante@
the following will not work in background mode as background send keystrokes doesnt work
-edited-
thanks..no prob for cant be bg...
11/25/2009 23:37 TomasLT#948
Need fast answer:
How to send f keys to ahk_id %client% besouse ControlSend,,{F2}, ahk_id %hook% dont work anymore
11/26/2009 00:11 Evan Lim#949
TomasLT@
controlsend never works
its always done by right controlclick at x150, y760 (F2 slot)
11/26/2009 00:12 TomasLT#950
Thx man for ur help. Ur great
12/15/2009 09:43 SaM.ThE.MaN#951
Yo,
Evan was wondering if you could make and auto loot ,Like you could have choices of which item the autoloot to pickup ,sorry cant be more clear :D
Sammy
12/15/2009 10:37 Evan Lim#952
SaM.ThE.MaN@
dont know how to read text to pick up
if u got a method, i dont mind trying it

other than that, i would recommend find the item ID that u want
change them to a pink dds image, then it can be picked up from most pixel search bots
12/15/2009 19:29 StefanHAKER#953
Where i can download it ? tell me pls :)
12/15/2009 23:52 Evan Lim#954
StefanHAKER@
i assume u are asking to download [Only registered and activated users can see links. Click Here To Register...]?
01/08/2010 20:56 ShadowTro#955
hey bro,can u make a background autoclicker,it is for ZeroOnline,well is a tq game,so i think it can work as in CO,thx if i know how to make it i wsnt asking =P <3
01/09/2010 02:50 Evan Lim#956
ShadowTro@
i dont have zero online, so not sure about the coordinates
but if u are interested in modifying scripts, u can edit the COELSE's script
the part u need to change is:
Code:
click 20,721 ; <- line 230, this is the HP bar coordinate check point
PixelGetColor, listThree9, 20, 721
click 20,721
Code:
click 60, 735 ; <- line 241, this is the MP bar coordinate check point
PixelGetColor, listThree12, 60, 735
click 60, 735
Code:
PixelSearch, , , 10, 720, 60, 722, %listThree9%, 10, Fast ; line 680,684
Code:
PixelSearch, , , 53, 720, 90, 740, %listThree12%, 40, Fast ; line704,708
to whereever zeroonline hp bar is
01/09/2010 04:38 ShadowTro#957
well,i just remember that long time ago evanxxx gave me a bg autoclicker,and it worked on co and zero,i found it today,but i cant extract it,i dont know why,probably because is a old file
01/16/2010 20:49 Belth#958
Just to highlight and comment on a piece of code:

Code:
leftclick:

    [COLOR="Red"]hwnd := ControlFromPoint(X, Y, "ahk_id " id,"", cX, cY)[/COLOR]
    PostMessage, 0x201, 0x8 | 0x1, cX & 0xFFFF | (cY & 0xFFFF) << 16,, ahk_id %hwnd%
    PostMessage, 0x202, 0x8      , cX & 0xFFFF | (cY & 0xFFFF) << 16,, ahk_id %hwnd%
return

ControlFromPoint(X, Y, WinTitle="", WinText="", ByRef cX="", ByRef cY="", ExcludeTitle="", ExcludeText="")
{
    if !(hwnd := WinExist(WinTitle, WinText, ExcludeTitle, ExcludeText))
        return false
    
    VarSetCapacity(pt,8)

    VarSetCapacity(wi,60), NumPut(60,wi)
    DllCall("GetWindowInfo","uint",hwnd,"uint",&wi)
    NumPut(X + (w:=NumGet(wi,4,"int")) - (cw:=NumGet(wi,20,"int")), pt,0)
    NumPut(Y + (h:=NumGet(wi,8,"int")) - (ch:=NumGet(wi,24,"int")), pt,4)
    
    Loop {
        child := DllCall("ChildWindowFromPointEx","uint",hwnd,"int64",NumGet(pt,0,"int64"),"uint",0x5)
        if !child or child=hwnd
            break
      
        DllCall("MapWindowPoints","uint",hwnd,"uint",child,"uint",&pt,"uint",1)
        hwnd := child
    }
    cX := NumGet(pt,0,"int")
    cY := NumGet(pt,4,"int")
    return hwnd
}
I noticed even though it runs in background that if you minimize the window the left click won't trigger. I tested and it's not the PostMessage function so I'm guessing either GetWindowInfo() or MapWindowPoints() requires a non-minimized window. A solution to this would be to place the line highlighted in red outside of the leftclick sub. It also stops the script from finding the handle repeatedly.

P.S. ControlFromPoint() is very useful much thnx.
01/16/2010 22:30 Evan Lim#959
Belth@
ehm i am quite sure that function works in minimized client (at least on XP 1-2 years ago)
so the function itself works, probably either OS handles thing differently or the client itself has been modified
01/17/2010 02:44 redshadow#960
Hey evan I have a question Im trying to make a zoom hack but Im not sure how to find the address in ce think you can give me some pointers?