auto it bot scripting help for a noob

08/24/2010 19:01 ninja3300#1
hi all i want to be able to write my own scripts and bots .... however i have read guide after guide and am scratching my head at it all

does anyone have a very very noob guide that explains what each function is/does in plain english and doesn't treat the user like there already experienced in using auto it

also if applicable i am use to batchfile work if you could also name the type of code auto it uses i can go from there if necessary.
08/24/2010 22:08 fenrir2037#2
For me, the easiest way to learn is to copy someone else's work. Not to steal credit or anything like that. But rewriting everything they did allows me to see, how and why they put that there. And also, google is your friend. I used it.
08/25/2010 00:11 Wild23#3
[Only registered and activated users can see links. Click Here To Register...] Try that xD
08/25/2010 18:15 ninja3300#4
retarded as i may sound looked up the autoIT script help on the autoit website and still couldn't make sense of it ........ knowing the actual name of the language used would be a big helper :S

also iv tried looking over a pulled apart bot script but again durp O.o
08/25/2010 20:16 Xraveinfinity#5
what each function does in plain english?
A function has multiple elements:

;func <- declares the beginning of a function declaration.
func nameOfFunction ($Parameter1,$parameter2,$Parameter3)
;do something here:
#cs (starts a comment)
Send("key") - would type out key in whatever input interface currently in selection.
Send("{F1}") - would type F1 into an interface.
;find out for yourself how to send other key combinations and stuff.
;beware the 'focus'. It is what is being selected, meaning either an textbox, or an entire window. (e.g. when the type cursor is flashing, anything you type would end up... in the box, if the type cursor doesn't flash, nothing would go into that text-input-box. Easy.)
also, there's:
MouseMove(x,y[,time]). everything in [] is optional parameters, you can give it, or you can not. but if you ... say:
functionName(x,y[,t[,z]])... and you put in something on the z parameter, you must give a t param as well.
look at other functions on the autoit function list. [Only registered and activated users can see links. Click Here To Register...]
#ce (ends the comment)
endfunc
;(kinda obvious, it ends the function declaration)
08/25/2010 20:39 ninja3300#6
Quote:
Originally Posted by Xraveinfinity View Post
what each function does in plain english?
A function has multiple elements:

;func <- declares the beginning of a function declaration.
func nameOfFunction ($Parameter1,$parameter2,$Parameter3)
;do something here:
#cs (starts a comment)
Send("key") - would type out key in whatever input interface currently in selection.
Send("{F1}") - would type F1 into an interface.
;find out for yourself how to send other key combinations and stuff.
;beware the 'focus'. It is what is being selected, meaning either an textbox, or an entire window. (e.g. when the type cursor is flashing, anything you type would end up... in the box, if the type cursor doesn't flash, nothing would go into that text-input-box. Easy.)
also, there's:
MouseMove(x,y[,time]). everything in [] is optional parameters, you can give it, or you can not. but if you ... say:
functionName(x,y[,t[,z]])... and you put in something on the z parameter, you must give a t param as well.
look at other functions on the autoit function list. [Only registered and activated users can see links. Click Here To Register...]
#ce (ends the comment)
endfunc
;(kinda obvious, it ends the function declaration)

thanks heaps kinda makes sense now ...... its gonna be a pain constructing the bot but i think i may be able to give it a shot ............. now a noob question but can imagesearch.au3 be used for any bot or do i have to write mine own version?

also when getting the mouse to click a certain spot do i need to put in coordinates or can it just search via image and click it without coordinates?
08/25/2010 22:13 Xraveinfinity#7
using an #include <imagesearch.au3> line, you automatically add all the functions from Imagesearch.au3 in, so you can call those functions in your script.

and... no. stop thinking so abstractly, MouseClick("left",$x,$y) is just what it says it is.
08/26/2010 10:22 ninja3300#8
then where exactly does the code mouseclick("left",$y3,$x3) come from? what do those numbers mean...... or is it just to number there place in the cycle of the script

eg: first instruction mouseclick("left",$y,$x) then add numbers per times this action is called upon mouseclick("left",$y2,$x2) being the second time?
08/26/2010 13:25 kotarou3#9
[Only registered and activated users can see links. Click Here To Register...] should clear things up a bit
08/30/2010 12:19 ninja3300#10
Quote:
Originally Posted by kotarou3 View Post
[Only registered and activated users can see links. Click Here To Register...] should clear things up a bit
cheers kinda got it ....... now i have to stop being a noob and actually figure the bot construction out :P
09/01/2010 07:52 XDFACE#11
Quote:
Originally Posted by fenrir2037 View Post
For me, the easiest way to learn is to copy someone else's work. Not to steal credit or anything like that. But rewriting everything they did allows me to see, how and why they put that there. And also, google is your friend. I used it.
me too! comments are the best too~