AutoHotKey Question

06/28/2009 08:21 Nizbel#1
Hello,

This is my first time making anything close too a bot, so please be nice :)

I wanted to make a macro (for taos), that sits for 11 seconds, uses meditate, then cures 10 timeson a guard (pre-set coordinates). Everything works fine except for the part where I need to hold control.
This is my code so far:

;Script - Zachary Frenette - CoTao

msgbox, Sit F1 Medidate F2 (Cure As Skill)
WinGet, id, ID, [C
loop
{
Send {F1}
sleep 11000
Send {F2}
sleep 2000

loop 10
{
Send {Control Down}
Sleep 1000
ControlClick, x288 y343, ahk_id %id%,,right
}
Send {Control Up}
Sleep 1000
}

As you can see, very basic, but the Control Down part doesn't work. (I've also tried Ctrl Down.

Does anyone know how to fix this? It's this only thing left to fix.

Reply soon, :)

Thanks :)

Nizbel
06/28/2009 10:29 Darkyy#2
Quote:
Originally Posted by Nizbel View Post
Hello,

This is my first time making anything close too a bot, so please be nice :)

I wanted to make a macro (for taos), that sits for 11 seconds, uses meditate, then cures 10 timeson a guard (pre-set coordinates). Everything works fine except for the part where I need to hold control.
This is my code so far:

;Script - Zachary Frenette - CoTao

msgbox, Sit F1 Medidate F2 (Cure As Skill)
WinGet, id, ID, [C
loop
{
Send {F1}
sleep 11000
Send {F2}
sleep 2000

loop 10
{
Send {Control Down}
Sleep 1000
ControlClick, x288 y343, ahk_id %id%,,right
}
Send {Control Up}
Sleep 1000
}

As you can see, very basic, but the Control Down part doesn't work. (I've also tried Ctrl Down.

Does anyone know how to fix this? It's this only thing left to fix.

Reply soon, :)

Thanks :)

Nizbel
Hey,
First I don't think that you can have 2 loops in 1 script. Corrent me if I'm wrong.
Second Send {Ctrl down} works only on the active screen. Doesn't work in background.

Hope I helped.
Darkyy
06/28/2009 11:40 clintonselke#3
ControlSend ?, I'm pretty sure i've seen someone using ControlSend instead of Send.. It would work just like ControlClick.
06/28/2009 15:38 Nizbel#4
Well, the two nested loops seems to work fine - so I can assume that you can :)

As for the Control Down, what do you mean? - because I've tried have conquer up on my screen as the script runs, and holding down control myself, and it still doesn't work. (I still get the red message sayingm you need to press ctrl to attack a guard).

So, I don't know where I'm going wrong :(

This is what I have now (I tried a few different things)

;Script - Zachary Frenette - CoTao


If WinExist("[Conquer2.0]")
{
WinActivate ;Use the window found above.
msgbox, Sit F1 Medidate F2 (Cure As Skill)
WinGet, id, ID, [C
loop
{
Send {F1}
sleep 11000
Send {F2}
sleep 2000

loop 10
{
ControlSend, ahk_id %id%, {Control Down}
Sleep 1000
ControlClick, x409 y331, ahk_id %id%,,right
}
ControlSend, ahk_id %id%, {Control Up}
Sleep 1000
}
}

else
{
msgBox, 0, No Conquer Found, No Counqer Window Found
}
06/28/2009 22:18 Darkyy#5
Last time I tried ControlSend it didn't work right.
06/29/2009 16:23 Nizbel#6
Well,

I've tried both Send And ControlSend - And I can't seem to get them working with Ctrl Down in the conquer window.

Does anyone else have any ideas? I've played around with it a bit more, but I still can't seem to get that part working.

Any help would be appreciated,

Thanks

Zach
07/06/2009 22:01 Evan Lim#7
check if this works first
Code:
msgbox, Sit F1 Medidate F2 (Cure As Skill)

loop
{
Send {F1}
sleep 11000
Send {F2}
sleep 2000

loop 10
{
Send {Ctrl Down}
Sleep 1000
Click 288,343
}
Send {Ctrl Up}
Sleep 1000
}
07/06/2009 23:19 ookamocka#8
Quote:
Originally Posted by clintonselke View Post
ControlSend ?, I'm pretty sure i've seen someone using ControlSend instead of Send.. It would work just like ControlClick.
doesn't controlsend bring up the window anyway, so it still wouldn't be in the background . . .
07/07/2009 00:16 IAmHawtness#9
Quote:
Originally Posted by ookamocka View Post
doesn't controlsend bring up the window anyway, so it still wouldn't be in the background . . .
Nope =D.
07/07/2009 00:24 biertje!#10
Try reading the manual and start with the basics I could give you the answer why it doesn't and how you should do it. The last time I did this the famous evanxx on the forum used my code to jump and use alot of other stuff to make bots. This backfired on me and caused tq to make click jail and some other security features. And I was using it for many years. g*d d**n So start again with the basic and build up from there. Good Luck