How to create your own bots/macros with AutoIt

05/07/2007 13:36 hok30#76
lol, every1 talkin about crackin sv, isnt that illegal??
05/17/2007 13:46 Basjethetopgamer#77
I gonna try it if it works +k ;)

<hr>Append on May 17 2007, 13:50<hr> sum things i dont understand lol xD ill find out ^^
05/18/2007 21:32 londonman#78
dude nice i havent read hole thing yet but +K 4 hard work
05/19/2007 06:23 AvatarOfMight#79
Yes, this is a very useful guide :D but I think that AutoIt has more limitations (or at least less functions) than AutoHotKey. There is a very useful guide made by hieitk about AutoHotKey.
For those who like programming you can try reading that guide too. Both guides, this one and hieitk's are very useful :D.
Here is the link to Hieitk's AutoHotKey tutorial [Only registered and activated users can see links. Click Here To Register...]
05/29/2007 04:58 jaketg99#80
omg i'm the biggest noob ever i can't even figure out how to do any of this ... oh well i guess i'm just gonna pay for sv so i don't gotta worry about this
06/16/2007 07:57 ccbrat17#81
ok i downloaded it and as dumb as this sounds i am a complete noob to this and dont know where to start, can someone pls help. i f it helps any cause im tryin to make something SIMILAR to sv
06/19/2007 22:21 eRaSeR!#82
+k! nice!!
but i got a question:
FileMove ( "source", "dest" [, flag] ) that moves a file from A to B
lets make an example: FileMove("D:&#092;AutoIt1.au3","D:&#092;123&#092;A utoIt1.au3")

the filename i want to move is "Autoit1.au3" but if i change the name of this file, it wont work anymore. how to say "move this file to D:&#092;123"??
i hope u can understand me :D my english is not the best
06/22/2007 23:20 eRaSeR!#83
what about answering?
ty

and sry because of double posting...
07/22/2007 03:23 IzzehO#84
Hi! Really love the tutorial - Helped get me started. Hate to ask a question on my first post.. But I can't seem to get this damned script to work. Basically the GUI opens and asks you to into the pixel colour of the monster under the mouse (And this is found by pressing Alt+A and copy and pasting into top box), and also what you want it to say every 15 minutes... The problem being that I'm pretty sure I haven't used the variables in the right way - What should happen is when you click start, it takes the &#036;pixel variable and then sets it as the pixel to find when it scans every 3 seconds.. This is where it stops working... it works fine without the GUI and just having a predefined pixel colour. Also the say command doesn't seem to work either - any help with that would be great!

Code:
#include &#60;GUIConstants.au3>

Dim &#036;start, &#036;var, &#036;pos, &#036;say, &#036;pixel, &#036;pixelcolor, &#036;btn

HotKeySet&#40;&#34;!x&#34;,&#34;QuitLoop&#34;&#41;
Func QuitLoop&#40;&#41;
&#036;start=0
EndFunc

GUICreate&#40;&#34;Choose your options&#34;, 400, 250&#41; 
GUICtrlCreateLabel&#40;&#34;Colour of Pixel&#58;&#34;, 30, 10&#41;
&#036;pixel = GUICtrlcreateinput&#40;&#34;&#34;, 30, 31, 200, 20&#41;
GUICtrlCreateLabel&#40;&#34;What to say&#58;&#34;, 30, 68&#41;
&#036;say = GUICtrlcreateinput&#40;&#34;Hi just watching movie so not really paying attention&#34;, 30, 88, 350, 20&#41;
GUICtrlCreateLabel&#40;&#34;Colour under mouse&#58; &#40;Press Alt+A to update&#41;&#34;, 30, 170&#41;
hotkeyset&#40;&#34;!a&#34;,&#34;change&#34;&#41;
Func change&#40;&#41;
&#036;pos=mousegetpos&#40;&#41;
&#036;var=PixelGetColor &#40; &#036;pos&#91;0&#93; , &#036;pos&#91;1&#93; &#41;
GUIctrlcreateinput&#40;&#036;var, 30, 190, 150, 20&#41;
EndFunc
&#036;btn = GUICtrlCreateButton&#40;&#34;Start&#34;, 350, 200, 40&#41;
GUISetState&#40;@SW_SHOW&#41;


&#036;msg = 0
While &#036;msg &#60;> &#036;GUI_EVENT_CLOSE
 * * * &#036;msg = GUIGetMsg&#40;&#41;
 * * * * * Select
 * * Case &#036;msg = &#036;btn
 * *&#036;pixelcolor = &#036;pixel
 * *GUISetState&#40;@SW_HIDE&#41;
 * *&#036;start = 1
 * * * EndSelect
Wend

While &#036;start=1
&#036;coord = Pixelsearch&#40;8, 33, 519, 416, &#036;pixelcolor&#41;
If @error &#60;> 1 then
MouseClick&#40;&#34;left&#34;, &#036;coord&#91;0&#93;, &#036;coord&#91;1&#93; &#41;
Endif
sleep&#40;3000&#41;
WEnd

While &#036;start=1
Send&#40;&#036;say&#41;
Send&#40;&#34;{ENTER}&#34;&#41;
sleep&#40;900000&#41;
WEnd
I got a really small screen - So just ignore coordinates of pixel search - ANYONE HELP PLEASE!

Below is a compiled version of the script!

<hr>Append on Jul 22 2007, 06:08<hr>
Quote:
Originally posted by eRaSeR!@Jun 19 2007, 22:21
+k! nice!!
but i got a question:
FileMove ( "source", "dest" [, flag] ) that moves a file from A to B
lets make an example: FileMove("D:&#092;AutoIt1.au3","D:&#092;123&#092;A utoIt1.au3")

the filename i want to move is "Autoit1.au3" but if i change the name of this file, it wont work anymore. how to say "move this file to D:&#092;123"??
i hope u can understand me :D my english is not the best
Hey, not sure if I understood correctly but try adding the flag FileMove("D:&#092;AutoIt1.au3","D:&#092;123&#092;A utoIt1.au3", 9) That will make it create the directory if it doesn't exist and also overwrite.. *Read below if that doesn't help*

Quote:

FILEMOVE:
Moves one or more files

FileMove ( "source", "dest" [, flag] )

Parameters
source: The source path and filename of the file to move. (* wildcards are supported)
dest: The destination path and filename of the moved file. (* wildcards are supported)
flag: [optional] this flag determines whether to overwrite files if they already exist:
Can be a combination of the following:
0 = (default) do not overwrite existing files
1 = overwrite existing files
8 = Create destination directory structure if it doesn't exist (See Remarks).

Return Value
Success: Returns 1.
Failure: Returns 0 if source cannot be moved or if dest already exists and flag=0.



Remarks
If the source and destination paths are on different volumes a copy and delete operation is performed rather than a move.

Because AutoIt lacks a "FileRename" function, use FileMove to rename a file!

The destination directory must already exist, except using with flag value '8'.
For instance the combined flag '9' (1 + 8) overwrites the target file and prechecks for the destination directory structure and if it doesn't exist creates it automatically.

Some file attributes can make the overwriting impossible.

Code:
Example
FileMove&#40;&#34;C&#58;&#092;foo.au3&#34;, &#34;D&#58;&#092;mydir&#092;bak.au3&#34;&#41;

; Second example&#58;
;  uses flags '1' &#40;owerwriting&#41; and '8' &#40;autocreating target dir structure&#41; together
;  moves all txt-files from temp to txtfiles and prechecks if
;  target directory structure exists, if not then automatically creates it
FileMove&#40;@TempDir & &#34;&#092;*.txt&#34;, @TempDir & &#34;&#092;TxtFiles&#092;&#34;, 9&#41;
07/23/2007 19:27 katze123#85
hey i am using this tut. i want to write a bot for Hero Online... when i write e.g.: MouseClick("left",x,y,#,speed) what should i enter @ x,y?? i want him to click on mobs. how can i do that?
08/07/2007 04:45 ViktorWood#86
much help. thanks +k :)
08/11/2007 10:45 nathan6911#87
can i git lil help guys i got it downlouded but cant seem to git it to work ;/
08/13/2007 15:58 geonsteelers#88
gay :( :)
08/13/2007 19:42 jemy757#89
German will be very nice bec i like dont undersdand any thing so plz try to make the same in german or does autoit have help in german
08/29/2007 21:19 heizl#90
omfg this is GREAT!!

is there a way to know were the x and the y cords for the mouse are located though?

or should I just try until I get the right results?