|
You last visited: Today at 10:13
Advertisement
How to create your own bots/macros with AutoIt
Discussion on How to create your own bots/macros with AutoIt within the CO2 Programming forum part of the Conquer Online 2 category.
01/19/2007, 10:25
|
#31
|
elite*gold: 0
Join Date: May 2006
Posts: 6
Received Thanks: 0
|
Nice work, it reaqlly helped me, i was lost for a while untill i read this +1k
|
|
|
01/19/2007, 23:05
|
#32
|
elite*gold: 0
Join Date: Dec 2006
Posts: 75
Received Thanks: 1
|
Quote:
Originally posted by spoonieluv97@Jan 6 2007, 21:15
Any questions? It took me a while to write this
|
ya umm how do i determine my mouse posiotion. lets say i wanna click ie then how do i determine where the mouse postion is for ie on my desktop.
|
|
|
01/20/2007, 00:45
|
#33
|
elite*gold: 0
Join Date: Apr 2006
Posts: 249
Received Thanks: 79
|
Quote:
Originally posted by zeroRooter+Jan 19 2007, 23:05--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (zeroRooter @ Jan 19 2007, 23:05)</td></tr><tr><td id='QUOTE'> <!--QuoteBegin--spoonieluv97@Jan 6 2007, 21:15
Any questions? It took me a while to write this
|
ya umm how do i determine my mouse posiotion. lets say i wanna click ie then how do i determine where the mouse postion is for ie on my desktop. [/b][/quote]
Theres a program called MacroExpress, and inside that program there is a little tool that is very handy. Where ever you mouse is, it tells you the coordinates of your mouse in that window, on the whole screen, and the color pixel its on. An easier way to do this is to make a mini program with AutoIt that gets your mouse position. I'll give you the code right here:
;start of scrip
hotkeyset("a","change")
Func change()
$pos=mousegetpos()
MsgBox(0,"Coords","Your mouse coords are (" & $pos[0] & "," & $pos[1] & ")")
EndFunc
While 1
WEnd
;end of scrip
OK. Since this is in the guides thread, I might as well explain what this program does. It makes a hotkey "a", so when you press the "a" key, it calls the function "change()". The function change() calls a function called mousegetpos(). mousegetpos() is a built in function of autoit that gets the current position of the mouse, and stores it into an array. An array is like a series of numbers stored under one variable name. getmousepos() stores the x coordinate in "$variablename[0]" and the y coordinate in "variablename[1]". In this case it is "$pos[0]" and "pos[1]". Now the function change() outputs a message box that tells the use the coordinates. Very simple script.
To recap things, to use this just past this code into autoit, start the script, and click "a" when your mouse is at the place where you want to find the coordinates.
Just curious, what are you making that opens ie? Or were you just playing around?
|
|
|
01/20/2007, 05:25
|
#34
|
elite*gold: 0
Join Date: Apr 2006
Posts: 397
Received Thanks: 17
|
Code:
$nbr=InputBox("Input Box","Give me a number 1-100");InputBox() is a built in GUI function that automatically creates a window where the user enters text or a number. Since there is a '$nbr=' before it, whatever the user enters into the box will be stored into the variable '$nbr'
If $nbr>50 Then; If $nbr is greater than 50 THEN do the following until the if is closed
MsgBox(0,"Output Box","Your number was greater than 50"); like inputbox, but simply displays text to the user and exits when they click "ok"
EndIf; end of the if-statement
If $nbr<50 Then
MsgBox(0,"Output Box","Your number was less than 50")
EndIf
If $nbr=50 Then
MsgBox(0,"Output Box","Your number was 50")
EndIf
Can be simpler...
Code:
$nbr=InputBox("Input Box","Give me a number 1-100");InputBox() is a built in GUI function that automatically creates a window where the user enters text or a number. Since there is a '$nbr=' before it, whatever the user enters into the box will be stored into the variable '$nbr'
If $nbr>50 Then; If $nbr is greater than 50 THEN do the following until the if is closed
MsgBox(0,"Output Box","Your number was greater than 50"); like inputbox, but simply displays text to the user and exits when they click "ok"
ElseIf $nbr<50 Then
MsgBox(0,"Output Box","Your number was less than 50")
ElseIf $nbr=50 Then
MsgBox(0,"Output Box","Your number was 50")
EndIf
|
|
|
01/20/2007, 08:34
|
#35
|
elite*gold: 0
Join Date: Apr 2006
Posts: 249
Received Thanks: 79
|
Quote:
Originally posted by bigassmuffin@Jan 20 2007, 05:25
Code:
$nbr=InputBox("Input Box","Give me a number 1-100");InputBox() is a built in GUI function that automatically creates a window where the user enters text or a number. Since there is a '$nbr=' before it, whatever the user enters into the box will be stored into the variable '$nbr'
If $nbr>50 Then; If $nbr is greater than 50 THEN do the following until the if is closed
MsgBox(0,"Output Box","Your number was greater than 50"); like inputbox, but simply displays text to the user and exits when they click "ok"
EndIf; end of the if-statement
If $nbr<50 Then
MsgBox(0,"Output Box","Your number was less than 50")
EndIf
If $nbr=50 Then
MsgBox(0,"Output Box","Your number was 50")
EndIf
Can be simpler...
Code:
$nbr=InputBox("Input Box","Give me a number 1-100");InputBox() is a built in GUI function that automatically creates a window where the user enters text or a number. Since there is a '$nbr=' before it, whatever the user enters into the box will be stored into the variable '$nbr'
If $nbr>50 Then; If $nbr is greater than 50 THEN do the following until the if is closed
MsgBox(0,"Output Box","Your number was greater than 50"); like inputbox, but simply displays text to the user and exits when they click "ok"
ElseIf $nbr<50 Then
MsgBox(0,"Output Box","Your number was less than 50")
ElseIf $nbr=50 Then
MsgBox(0,"Output Box","Your number was 50")
EndIf
|
k.
|
|
|
01/21/2007, 18:43
|
#36
|
elite*gold: 0
Join Date: Dec 2006
Posts: 75
Received Thanks: 1
|
ooooo kool
<hr> Append on Jan 21 2007, 18:52<hr>
Quote:
Originally posted by spoonieluv97+Jan 20 2007, 00:45--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (spoonieluv97 @ Jan 20 2007, 00:45)</td></tr><tr><td id='QUOTE'>
Quote:
Originally posted by -zeroRooter@Jan 19 2007, 23:05
<!--QuoteBegin--spoonieluv97
|
Quote:
@Jan 6 2007, 21:15
Any questions? It took me a while to write this
|
ya umm how do i determine my mouse posiotion. lets say i wanna click ie then how do i determine where the mouse postion is for ie on my desktop.
|
Theres a program called MacroExpress, and inside that program there is a little tool that is very handy. Where ever you mouse is, it tells you the coordinates of your mouse in that window, on the whole screen, and the color pixel its on. An easier way to do this is to make a mini program with AutoIt that gets your mouse position. I'll give you the code right here:
;start of scrip
hotkeyset("a","change")
Func change()
$pos=mousegetpos()
MsgBox(0,"Coords","Your mouse coords are (" & $pos[0] & "," & $pos[1] & ")")
EndFunc
While 1
WEnd
;end of scrip
OK. Since this is in the guides thread, I might as well explain what this program does. It makes a hotkey "a", so when you press the "a" key, it calls the function "change()". The function change() calls a function called mousegetpos(). mousegetpos() is a built in function of autoit that gets the current position of the mouse, and stores it into an array. An array is like a series of numbers stored under one variable name. getmousepos() stores the x coordinate in "$variablename[0]" and the y coordinate in "variablename[1]". In this case it is "$pos[0]" and "pos[1]". Now the function change() outputs a message box that tells the use the coordinates. Very simple script.
To recap things, to use this just past this code into autoit, start the script, and click "a" when your mouse is at the place where you want to find the coordinates.
Just curious, what are you making that opens ie? Or were you just playing around? [/b][/quote]
you mentioned something about your arhcer bot that searches for a certain collor pixel can you tell me how you did that cuz i trying to make a bot for another game xD thx btw for showing me this program
|
|
|
01/21/2007, 18:53
|
#37
|
elite*gold: 0
Join Date: Jun 2006
Posts: 325
Received Thanks: 7
|
its impossible to make program that it close error window in co
dc window i mean
|
|
|
01/21/2007, 21:21
|
#38
|
elite*gold: 0
Join Date: Dec 2006
Posts: 75
Received Thanks: 1
|
Quote:
Originally posted by saulius321@Jan 21 2007, 18:53
its impossible to make program that it close error window in co
dc window i mean
|
uhh ya it actually is...
|
|
|
01/22/2007, 00:14
|
#39
|
elite*gold: 0
Join Date: Apr 2006
Posts: 249
Received Thanks: 79
|
Quote:
Originally posted by saulius321@Jan 21 2007, 18:53
its impossible to make program that it close error window in co
dc window i mean
|
It is possible to make that. I don't think it's possible to do it in AutoIt, but it is in Visual Basic. Once I find some time and my friend gets me VB 2005, I'm gonna start learning it. And for the person that wanted to know about searching for a pixel color, it goes something like this:
;start script
$coord = Pixelsearch(0, 0, 500, 500, "0xB50400", 1, 20)
If @error <> 1 then
MouseClick("right", $coord[0], $coord[1] )
Endif
;endscipt
Explanation
Line 1: this runs the function "pixelsearch". The first four parameters are the left,top,right,and bottom border coordinates of the rectange to search. The about example would search a rectange starting at (0,0) wiht a width and height of 500. The 5th parameter is the color to search for. "0xB50400" is the color of a CO healthbar. The 6th parameter is how many shades different of that color it will search for. The 7th parameter is how many pixels its searches. Entering 20 with search every 20 pixels. If it finds a pixel with this color, it stores the x coord into $coord[0] and the y coord into $coord[1]. If it can't find one, @error is set to 1.
Line 2: If error does not equal 1 (meaning it found a pixel), Then....
Line 3: Clicks ($coord[0],$coord[1]) once
Line 4: End of if-statement
|
|
|
01/22/2007, 11:10
|
#40
|
elite*gold: 0
Join Date: Dec 2006
Posts: 17
Received Thanks: 0
|
got a question is autoit for conquer like ACTool for maplestory?
|
|
|
01/22/2007, 19:13
|
#41
|
elite*gold: 0
Join Date: Dec 2006
Posts: 75
Received Thanks: 1
|
Quote:
Originally posted by spoonieluv97+Jan 22 2007, 00:14--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (spoonieluv97 @ Jan 22 2007, 00:14)</td></tr><tr><td id='QUOTE'> <!--QuoteBegin--saulius321@Jan 21 2007, 18:53
its impossible to make program that it close error window in co
dc window i mean
|
It is possible to make that. I don't think it's possible to do it in AutoIt, but it is in Visual Basic. Once I find some time and my friend gets me VB 2005, I'm gonna start learning it. And for the person that wanted to know about searching for a pixel color, it goes something like this:
;start script
$coord = Pixelsearch(0, 0, 500, 500, "0xB50400", 1, 20)
If @error <> 1 then
MouseClick("right", $coord[0], $coord[1] )
Endif
;endscipt
Explanation
Line 1: this runs the function "pixelsearch". The first four parameters are the left,top,right,and bottom border coordinates of the rectange to search. The about example would search a rectange starting at (0,0) wiht a width and height of 500. The 5th parameter is the color to search for. "0xB50400" is the color of a CO healthbar. The 6th parameter is how many shades different of that color it will search for. The 7th parameter is how many pixels its searches. Entering 20 with search every 20 pixels. If it finds a pixel with this color, it stores the x coord into $coord[0] and the y coord into $coord[1]. If it can't find one, @error is set to 1.
Line 2: If error does not equal 1 (meaning it found a pixel), Then....
Line 3: Clicks ($coord[0],$coord[1]) once
Line 4: End of if-statement [/b][/quote]
your so **** smart i wouldnt of igured that onje out lol im more into python...
|
|
|
01/22/2007, 19:36
|
#42
|
elite*gold: 0
Join Date: Jul 2006
Posts: 2,216
Received Thanks: 794
|
i like it  +k
|
|
|
01/23/2007, 01:17
|
#43
|
elite*gold: 0
Join Date: Apr 2006
Posts: 249
Received Thanks: 79
|
Quote:
Originally posted by liljkiller00@Jan 22 2007, 11:10
got a question is autoit for conquer like ACTool for maplestory?
|
I'm sorry, I can't answer your question because I've never played maple story, so I don't know what ACTool is.
|
|
|
01/23/2007, 06:16
|
#44
|
elite*gold: 0
Join Date: Sep 2006
Posts: 22
Received Thanks: 1
|
hey,
Is it possible to translate the exe file back into the script?
If possible, how?
Thx
|
|
|
01/23/2007, 13:39
|
#45
|
elite*gold: 0
Join Date: Apr 2006
Posts: 249
Received Thanks: 79
|
Quote:
Originally posted by Coup_de-grāce@Jan 23 2007, 06:16
hey,
Is it possible to translate the exe file back into the script?
If possible, how?
Thx
|
Yeah, what you do is go to Start>All Programs>AutoIt v3>Extras>Decompile from .exe to script. Then you choose location of .exe But when you compile a script to .exe, it still keeps the script which you can still edit and run.
|
|
|
 |
|
Similar Threads
|
[GUIDE] How to create Scripts/bots with AutoIT
09/22/2010 - Tutorials - 6 Replies
for all who want to learn something or create bots for browsergames, mmorpgs and other games
download Autoit here:
http://www.autoitscript.com/cgi-bin/getfile.pl?au toit3/autoit-v3-setup.exe
Now run the Scite Script Editor
this is where you type in your code, let check your code if errors are in it and compile it to executable exe file.
the first thing you need are the coordinates of your mouse to find locations on the screen, like skill buttons, status bars, or just positions which...
|
(GUIDE)How to create own scripts/bots with AutoIt
11/19/2008 - Rappelz - 4 Replies
for all who want to learn something or create bots for browsergames, mmorpgs and other games
download Autoit here:
http://www.autoitscript.com/cgi-bin/getfile.pl?au toit3/autoit-v3-setup.exe
Now run the Scite Script Editor
this is where you type in your code, let check your code if errors are in it and compile it to executable exe file.
the first thing you need are the coordinates of your mouse to find locations on the screen, like skill buttons, status bars, or just positions which...
|
learning how to create/write Bots/Macros
01/28/2006 - Conquer Online 2 - 8 Replies
Well I know that this is kind of off topic and a lot of people have been flamed by asking questions. I've tried a search and couldnt really find anything in english that i could actually read.
Does anyone know any good sites or anything that a beginner could start learning how to create/write programs for bots and stuff like that? I'm learning how to write programs in VisualBasic at school but dont really know much. If anyone could supply any sites and stuff it would be awesome. thanks in...
|
All times are GMT +1. The time now is 10:13.
|
|