AHK Problem

01/14/2009 06:30 1111111111#1
Hi, I've searched all over and could not find a solution to my problem, maybe one of you geniuses can help me out.

I'm trying to do background clickbot that basically 7 clicks in the background and repeats. I figured out how to make it click in the background with ControlClick and WinGet commands.

I can get it to click anyqhere on the Conquer screen in the background, got it to drop items, click on npcs, but the thing I'm confused about is why I cannot get it to click on the dialogue box of an npc and answer the npc.

It is as if the macro is trying to click below the dialogue box but is unable do and does nothing. I used Window Spy with the AHK(AutoHotKey) and looked at the class of the Conquer window and the dialogue box.

What I found out was that the dialogue box was #327704 and the Conquer window was #327701. I then tried adding ahk_class #327704 to where the ahk_id %id% goes, but that resulted in the Macro not clicking at all.

Can anyone clarify this matter for me? Any help is greately appreciated.
01/14/2009 20:20 Ulfius#2
Is it clicking, but just not in the right spot, or is it not clicking at all? I found that sometimes you have to apply an offset for the top bar size (i.e. the Close X button is at (1010, -10)).

Typically for NPC dialog boxes, I just use coordinates of the dialog answers and don't mess with the classes. I also have not used ControlClick, just MouseClick - there might be some differences.
01/15/2009 08:13 1111111111#3
Quote:
Originally Posted by Ulfius View Post
Is it clicking, but just not in the right spot, or is it not clicking at all? I found that sometimes you have to apply an offset for the top bar size (i.e. the Close X button is at (1010, -10)).

Typically for NPC dialog boxes, I just use coordinates of the dialog answers and don't mess with the classes. I also have not used ControlClick, just MouseClick - there might be some differences.
I believe its clicking because it makes me walk if the dialogue box is not there, also i believe the coordinates are correct because i used:
WinActivate, ahk_id %COid%
Send, {Click 315, 115}
sleep 1500
and it cliked on the answer where i wanted it to click but when i used:
ControlClick, x315 y115,ahk_id %COid% ,,left
sleep, 1500

it would do nothing when the dialogue box was open =/

thanks for your input. Any other help would be appreciated.
01/18/2009 16:59 Evan Lim#4
1111111111@
i have no idea how to solve this
probably the best bet is to use winspy to get the classNN