|
You last visited: Today at 11:42
Advertisement
AutoHotKey tutorial
Discussion on AutoHotKey tutorial within the CO2 Guides & Templates forum part of the Conquer Online 2 category.
11/17/2007, 19:49
|
#91
|
elite*gold: 20
Join Date: Oct 2006
Posts: 2,707
Received Thanks: 2,525
|
ok here is the situation
i put F1 and F2 slot for med and sit (for tao to gain mana)
F1: 110, 740
F2: 160, 740
and i have a second function that keeps right clicking 100 pixel above of the tao, which let that point be 500, 250. so whenever any players pass that clicking point, they will get stig or other skills.
of course, i do have a script for that already, which is:
Code:
#persistent
WinGet,id, ID,[Conquer2.0]
sleep 1000
loop
{
ControlClick, x500 y250,ahk_id %id%,,RIGHT
sleep 100
ControlClick, x110 y740,ahk_id %id%,,RIGHT
sleep 200
ControlClick, x160 y740,ahk_id %id%,,RIGHT
sleep 200
}
no problem for this code whatsoever, it runs perfectly
but it definately looks like using bots when other people look at it
so i was trying to make the sit and med function slower and more random sleep time. however the problem for that will be it might miss clicking 500, 250.
therefore i am trying to make something like this:
function 1:
Code:
ControlClick, x110 y740,ahk_id %id%,,RIGHT
sleep 2000
ControlClick, x160 y740,ahk_id %id%,,RIGHT
sleep 2000
function 2:
Code:
ControlClick, x500 y250,ahk_id %id%,,RIGHT
sleep 200
by using the settimer function, it still load function 1 first, then load function2 afterwards...
so no difference than:
Code:
ControlClick, x110 y740,ahk_id %id%,,RIGHT
sleep 2000
ControlClick, x160 y740,ahk_id %id%,,RIGHT
sleep 2000
ControlClick, x500 y250,ahk_id %id%,,RIGHT
sleep 200
for another example to understand what i am trying to say will be just like playing drums, right hand hits the drum every 2 seconds, while the left hand hits the drum every 0.2seconds.
any ideas that work around it?
PS* doesnt affect me anymore because i dont use the archer spawn to level at this moment. the purpose of this was when an archer click fly from the spot where my tao sits, the player will get stig and fly into the spawn.
|
|
|
11/17/2007, 20:38
|
#92
|
elite*gold: 0
Join Date: Mar 2007
Posts: 608
Received Thanks: 365
|
Quote:
Originally Posted by evanxxxm
ok here is the situation
i put F1 and F2 slot for med and sit (for tao to gain mana)
F1: 110, 740
F2: 160, 740
and i have a second function that keeps right clicking 100 pixel above of the tao, which let that point be 500, 250. so whenever any players pass that clicking point, they will get stig or other skills.
of course, i do have a script for that already, which is:
[......]
but it definately looks like using bots when other people look at it
[......]
|
If u want to make it more random, try using the function ... random xd
it works like this:
Random, OutPutVar, min, max
Here is an idea:
Code:
loop
{
Random, med_time , 1000, 2000
Random, skill_time , 1000, 2000
Random, delay_time , 100, 200
sit_time := med_time + delay_time
ControlClick, x500 y250,ahk_id %id%,,RIGHT
sleep,%med_time%
ControlClick, x110 y740,ahk_id %id%,,RIGHT
sleep, %sit_time%
ControlClick, x160 y740,ahk_id %id%,,RIGHT
sleep, %skill_time%
}
Of course you have to change the times, I never had a tao so I dont understand how it works, maybe u have to change the order between sit/med/skill as well.
Anyway, I hope it helps ^^
|
|
|
11/18/2007, 01:34
|
#93
|
elite*gold: 20
Join Date: Oct 2006
Posts: 2,707
Received Thanks: 2,525
|
then again, with that script, sometimes 500, 250 will have to wait a 4 second cycle sleep
which will miss right click stiging the archer when he flies up
archer 100 lvl lower can only fly for 40 seconds, that 4 seconds waiting to get stig can get people frustrated.
so again for the drum example for the scrpt u provide will be:
Code:
Right
Right
Left
Right
Right
Left
Right
Right
Left....
which thats not i want, i want something similar to:
Code:
Right Left
Right
Right
Right
Right Left
Right
Right
Right
Right Left.......
i understand how to make a loop like
Code:
loop
{
Random, time , 5, 20
loop %time%
{
ControlClick, x500 y250,ahk_id %id%,,RIGHT
sleep 100
}
ControlClick, x110 y740,ahk_id %id%,,RIGHT
}
Random, time , 5, 20
loop %time%
{
ControlClick, x500 y250,ahk_id %id%,,RIGHT
sleep 100
}
ControlClick, x160 y740,ahk_id %id%,,RIGHT
}
but trying to learn what exactly does the settimer function do.
if a simple loop like that can works the same, why need the settimer function
i was thinking about the settimer function might be more intelligent
|
|
|
11/19/2007, 03:53
|
#94
|
elite*gold: 0
Join Date: Mar 2007
Posts: 608
Received Thanks: 365
|
Quote:
Originally Posted by evanxxxm
then again, with that script, sometimes 500, 250 will have to wait a 4 second cycle sleep
which will miss right click stiging the archer when he flies up
archer 100 lvl lower can only fly for 40 seconds, that 4 seconds waiting to get stig can get people frustrated.
so again for the drum example for the scrpt u provide will be:
Code:
Right
Right
Left
Right
Right
Left
Right
Right
Left....
[...]
|
If u still want mora than 1 function to work at the same time, why dont you try with the controlSend(Fx) instead of making a right click over the Fx buttons?
you cant make 2 clicks on differents position at the same time, but maybe u can send more than one key at the same time.
g2g, peace
|
|
|
01/16/2008, 15:09
|
#95
|
elite*gold: 0
Join Date: Nov 2006
Posts: 286
Received Thanks: 38
|
I need som help
how to do that when some1 press button then this app close and open new app
|
|
|
01/16/2008, 18:18
|
#96
|
elite*gold: 20
Join Date: Oct 2006
Posts: 2,707
Received Thanks: 2,525
|
TomasLT@
if u are refering to the AHK program, u can do
^r::reload
Ctrl+R will activate a reload program
if u are referring to specific program like CO window, u can do
^r::
{
winkill, [Conquer2.0]
run, play.exe, C:Program FilesConquer 2.0
}
|
|
|
01/17/2008, 15:54
|
#97
|
elite*gold: 0
Join Date: Nov 2006
Posts: 286
Received Thanks: 38
|
can some1 give me simple code that program open notepad and write some text?
|
|
|
01/18/2008, 00:23
|
#98
|
elite*gold: 20
Join Date: Oct 2006
Posts: 2,707
Received Thanks: 2,525
|
TomasLT@
Run, Notepad.exe, C:\My Documents, max
sleep 500
send 1234567890
|
|
|
01/18/2008, 13:03
|
#99
|
elite*gold: 0
Join Date: Nov 2006
Posts: 286
Received Thanks: 38
|
Ty man. i forgot so simpe code xD
|
|
|
09/13/2009, 23:41
|
#100
|
elite*gold: 0
Join Date: Apr 2006
Posts: 40
Received Thanks: 1
|
hieitk :
erm so with autohotkey u cant make bots that u can minimize and do other things on the comp right?
|
|
|
10/11/2009, 02:17
|
#101
|
elite*gold: 0
Join Date: Oct 2009
Posts: 1
Received Thanks: 0
|
Hello there everyone. I was wondering if someone could explain to me why I can't random to work.
Quote:
Gui,Show,h150 w250, Learning
Gui, Add, Button, x20 y110 w50 h20 gdouble,Answer
Gui, Add, Text, x10 y50 w90 Center,Random + 2 x
Gui, Add, Edit, w60 h20 x130 y50 vNumber Center
return
Double:
{
Random,A_number,10,2000
Gui,Submit,NoHide
double := (2 * Number) + %A_number%
Msgbox,,Result, The Result is %double%
return
}
GuiClose:
ExitApp
|
|
|
|
10/11/2009, 02:34
|
#102
|
elite*gold: 0
Join Date: Oct 2009
Posts: 49
Received Thanks: 10
|
Nice tuto!!
|
|
|
07/18/2010, 00:19
|
#103
|
elite*gold: 0
Join Date: Jul 2010
Posts: 1
Received Thanks: 0
|
Very good Tuto
Heregoes my first code in AutoHotKey, thats to this tutorial and help file that keep me on track.
Thanks
Code:
#NoTrayIcon
Gui, Show, w400 h300, Média do Estágio
Menu, FileMenu, Add,S&air,MenuHandler
Gui, Menu, FileMenu
Gui, add, text, x10 y10 cblue , 1º
Gui, add, edit, x30 y10 h20 w80 vNum1
Gui, add, text, x280 y10 cblue , 2º
Gui, add, edit, x300 y10 h20 w80 vNum2
Gui, add, text, x10 y50 cblue , 3º
Gui, add, edit, x30 y50 h20 w80 vNum3
Gui, add, text, x280 y50 cblue , 4º
Gui, add, edit, x300 y50 h20 w80 vNum4
Gui, add, text, x10 y90 cblue , 5º
Gui, add, edit, x30 y90 h20 w80 vNum5
Gui, add, text, x280 y90 cblue , 6º
Gui, add, edit, x300 y90 h20 w80 vNum6
Gui, add, text, x10 y130 cblue , 7º
Gui, add, edit, x30 y130 h20 w80 vNum7
Gui, add, text, x280 y130 cblue , 8º
Gui, add, edit, x300 y130 h20 w80 vNum8
Gui, add, text, x10 y170 cblue , 9º
Gui, add, edit, x30 y170 h20 w80 vNum9
Gui, add, text, x130 y175 cblue, Resultado
Gui, add, edit, x200 y170 h20 w180 vNumResult ReadOnly
Gui, add, Button, x30 y200 w80 h30 gmedia, Calcular
Gui, add, button, x300 y200 w80 h30 gLimpar, Limpar
Gui, Add, Picture, w60 h-1 x160 y50 glink,logo.png
gui, Font, s10, Verdana
Gui, Add, Text, x60 y230, Agrupamento de Escolas do Alto do Lumiar
Gui, Add, Text, x150 y250, EB 2,3 D. José I
Return
MenuHandler:
MsgBox ,Obrigado Pela Preferência
ExitApp
Return
media:
{
Gui, Submit, NoHide
Resultado := Num1 + Num2 + Num3 + Num4 + Num5 + Num6 + Num7 + Num8 + Num9
Resultado := Ceil(Resultado /9)
If Resultado < 3
{
GuiControl,,NumResult,O valor Obtido no Estágio é inferior a positivo, = %Resultado%
}
Else
GuiControl,,NumResult,Nota Final %Resultado%
Return
}
Limpar:
{
NumResult := ""
Num1 := ""
Num2 := ""
Num3 := ""
Num4 := ""
Num5 := ""
Num6 := ""
Num7 := ""
Num8 := ""
Num9 := ""
GuiControl,,Num1
GuiControl,,Num2
GuiControl,,Num3
GuiControl,,Num4
GuiControl,,Num5
GuiControl,,Num6
GuiControl,,Num7
GuiControl,,Num8
GuiControl,,Num9
GuiControl,,NumResult
Return
}
link:
{
Run http://www.agrupamentoescolasaltodolumiar.com
Return
}
Return
GuiClose:
ExitApp
|
|
|
08/04/2010, 20:03
|
#104
|
elite*gold: 0
Join Date: Aug 2010
Posts: 54
Received Thanks: 7
|
THX for sharing.
|
|
|
10/27/2010, 17:48
|
#105
|
elite*gold: 0
Join Date: Aug 2010
Posts: 951
Received Thanks: 76
|
Seems autoit can have a disable on characters but ahk can`t????
|
|
|
 |
|
Similar Threads
|
[HELP]Autohotkey
06/11/2011 - AutoIt - 8 Replies
Hallu, elitepvpers! ichh habe gaanz kur ne frage, wo ich es echt nich raffe, habe schon sufu benutzt und gegoogelt, aber nix gefunden, außer die normale anleitung auf english, die ich iwie nich raffe; kann mir wer bei autoit in diesen"noob" script autohotkey einbauen, damit der bot wenn ich auf F7 klicke automatisch beenden!
hier der "noob" script!
while 1
sleep(500)
mousemove(1191,109,0)
sleep(200)
mouseclick("right")
sleep(200)
mousemove(1235,186,0)
|
AutoHotKey Help
01/17/2009 - General Coding - 1 Replies
Hi, Im having trouble with making a background macro for a game called ConquerOnline, refer to this thread . If anyone can help, I would really appreciate it.
|
AutoHotKey Help?
12/06/2007 - Conquer Online 2 - 11 Replies
I have Read the "Help" File but still cant figure out how to make a macro that works on client 1 while playing on client 2. Any ideas or codes for this :confused:
I'm working on a macro that heals/pots/sits/med/stig/dc/area to macro etc.
Pretty much it will play the game for u :D
|
Help with AutoHotKey
03/24/2006 - Conquer Online 2 - 3 Replies
Hey everyone i need some help. does anyone know how to write a command where you hold down ctrl while mouse clicking? all i've managed to do so far is make it click ctrl, let go, then mouse click. anyone know the codes to how i can do them both together? thanks.
shadowHacker
|
All times are GMT +1. The time now is 11:44.
|
|