MMOwned - World of Warcraft Exploits, Hacks, Bots and Guides  
Homepage Register FAQ Members Mark Forums Read Advertise Marketplace FPSowned


Go Back   MMOwned - World of Warcraft Exploits, Hacks, Bots and Guides > Discussions > General Programs
Reload this Page How To: Learn Basic AutoIt
General Programs Useful Programs and Applications non WoW-related.

Reply
 
LinkBack Thread Tools
How To: Learn Basic AutoIt
(#1)
Old
glynbeard's Avatar
glynbeard is Online
[--- 純被釋放的能源 ---]
Rep Power: 5
Reputation: 401
glynbeard is just really niceglynbeard is just really niceglynbeard is just really niceglynbeard is just really niceglynbeard is just really nice
 
Posts: 1,712
Join Date: Jul 2006
Location: 任何
How To: Learn Basic AutoIt - 10-19-2007

How to AutoIt!

[Only registered and activated users can see links. ] its for after you've complete this.


Greetings all Glyn here, this is my first programming guide I have ever posted so I hope you all like it. I put a lot of work into it and I think it will help everyone out a little in the wonderful world of scripting.


First off, download these two links (one is the actual Autoit program and the other is a base of tut's)

-[Only registered and activated users can see links. ]

and

-[Only registered and activated users can see links. ]

Now before we really start I want to start with a Q/A piece and a little list of various commands because you will have absolutely no idea what your doing if you don't understand the basics.


Q-What is Autoit?


A-AutoIt v3 is a freeware BASIC-like scripting language designed for automating the Windows GUI and general scripting. It uses a combination of simulated

keystrokes, mouse movement and window/control manipulation in order to automate tasks in a way not possible or reliable with other languages (e.g. VBScript

and SendKeys). AutoIt is also very small, self-contained and will run on all versions of Windows out-of-the-box with no annoying "runtimes" required!


Q-What can I do with Autoit?


A-You can create, alter or delete your very own programs. For instance the new Autoit V3 has the option of making GUI's (Graphical User Interface) which can
be the basis on a major program you might be working on. It can also be used for much more (to much to explain) but remember the sky is teh limit.


Q-What sort of programs have been created by Autoit?


A-Well for one, Noggit (Autoit) see the resemblance. Made by Maul05-the god of autoit scripting. There have been a couple other well known programs made but I'm not sure most here people would know them.

Q-Whats the difference between Autoit scripting and C++ or Javascript?



A-These languages are different in their own way. Each different script will have a different end result. Some languages take ages to learn as well (C++ for example).

Q-What are the current technical linits of Autoit?


A- As follows:
Maximum length of a single script line: 4,095
Maximum string length: 2,147,483,647 characters

Number range (floating point): 1.7E–308 to 1.7E+308 with 15-digit precision
Number range (integers): 64-bit signed integer
Hexadecimal numbers: 32-bit signed integer (0x80000000 to 0x7FFFFFFF)

Arrays: A maximum of 64 dimensions and/or a total of 16 million elements
Maximum depth of recursive function calls: 384 levels

Maximum number of variables in use at one time: No limit
Maximum number of user defined functions: No limit

Maximum number of GUI windows: 1024
Maximum number of GUI controls per window: 4096

I will add more if more questions appear later on.


A list of different and useful commands:

Run - Executes a .exe program (WoW for example)
Sleep(insert # here) - Makes the program hold
GUIcreate to GUIswitch - All useful for makeing and altering GUI's
Execute - Executes an expression
Beep - Does exactly as it means
Mousemove(10, 100) - Moves the mouse 10 from the left and 100 from top
Exit - Obvious
Exitloop - Ends a loop
Binary - Returns the Binary Representation of and Expression
Call - Calls a user-defined function
Tan - Calculates the Tangent of a Number
Send - This will send simulated keystrokes to a window
Log - Calculates the natural logarithm of a number

And now for a list of some of the Macro's:

@AppDataCommonDir - Path to Application Data
@AppDataDir - Path to current user's Application Data
@AutoItExe - The full path and filename of the AutoIt executable currently running. For compiled scripts it is the path of the compiled script.
@AutoItPID - PID of the process running the script.
@AutoItVersion - Version number of AutoIt such as 3.0.81.0
@COM_EventObj - Object the COM event is being fired on. Only valid in a COM event Function.
@CommonFilesDir - Path to Common Files folder
@Compiled - Returns 1 if script is a compiled executable; otherwise, returns 0.
@ComputerName - Computer's network name.
@ComSpec - value of %comspec%, the SPECified secondary COMmand interpreter;
primarily for command line uses, e.g. Run(@ComSpec & " /k help | more")
@CR - Carriage return, Chr(13); sometimes used for line breaks.
@CRLF = @CR & @LF ;occasionally used for line breaks.
@DesktopCommonDir - Path to Desktop
@DesktopDir - Path to current user's Desktop
@DesktopHeight - Height of the desktop screen in pixels. (vertical resolution)
@DesktopWidth - Width of the desktop screen in pixels. (horizontal resolution)
@DesktopDepth - Depth of the desktop screen in bits per pixel.
@DesktopRefresh - Refresh rate of the desktop screen in hertz.
@DocumentsCommonDir - Path to Documents
@error - Status of the error flag. See the SetError function.
@exitCode - Exit code as set by Exit statement.
@exitMethod - Exit method. See the Func OnAutoItExit().
@extended - Extended function return - used in certain functions such as StringReplace.
@FavoritesCommonDir - Path to Favorites
@FavoritesDir - Path to current user's Favorites
@GUI_CtrlId - Last click control identifier. Only valid in an event Function. See the GUICtrlSetOnEvent function.
@GUI_CtrlHandle - Last click control handle. Only valid in an event Function. See the GUICtrlSetOnEvent function.
@GUI_DragId - Drag control identifier. Only valid in an event Function. See the GUISetOnEvent function.
@GUI_DragFile - Filename of the file being dropped. Only valid in an event Function. See the GUISetOnEvent function.
@GUI_DropId - Drop control identifier. Only valid in an event Function. See the GUISetOnEvent function.
@GUI_WinHandle - Last click GUI window handle. Only valid in an event Function. See the GUICtrlSetOnEvent function.
@HomeDrive - Drive letter of drive containing current user's home directory.
@HomePath - Directory part of current user's home directory. To get the full path, use in conjunction with @HomeDrive.
@HomeShare - Server and share name containing current user's home directory.
@HOUR - Hours value of clock in 24-hour format. Range is 00 to 23
@HotKeyPressed - Last hotkey pressed. See the HotKeySet function.
@InetGetActive - Is 1 if a InetGet download is currently active, otherwise is 0.
@InetGetBytesRead - During a InetGet download this is the number of bytes currently read. It is -1 when there is an error downloading.
@IPAddress1 - IP address of first network adapter. Tends to return 127.0.0.1 on some computers.
@IPAddress2 - IP address of second network adapter. Returns 0.0.0.0 if not applicable.
@IPAddress3 - IP address of third network adapter. Returns 0.0.0.0 if not applicable.
@IPAddress4 - IP address of fourth network adapter. Returns 0.0.0.0 if not applicable.
@KBLayout - Returns code denoting Keyboard Layout. See Appendix for possible values.
@LF - Line feed, Chr(10); typically used for line breaks.
@LogonDNSDomain - Logon DNS Domain.
@LogonDomain - Logon Domain.
@LogonServer - Logon server.
@MDAY - Current day of month. Range is 01 to 31
@MIN - Minutes value of clock. Range is 00 to 59
@MON - Current month. Range is 01 to 12
@MyDocumentsDir - Path to My Documents target
@NumParams - Number of parameters used to call the user functions
@OSBuild - Returns the OS build number. For example, Windows 2003 Server returns 3790
@OSLang - Returns code denoting OS Language. See Appendix for possible values.
@OSServicePack - Service pack info in the form of "Service Pack 3" or, for Windows 95, it may return "B"
@OSTYPE - Returns "WIN32_NT" for NT/2000/XP/2003/Vista and returns "WIN32_WINDOWS" for 95/98/Me
@OSVersion - Returns one of the following: "WIN_VISTA", "WIN_2003", "WIN_XP", "WIN_2000", "WIN_NT4", "WIN_ME", "WIN_98", "WIN_95"
@ProcessorArch - Returns one of the following: "X86", "IA64", "X64"
@ProgramFilesDir - Path to Program Files folder
@ProgramsCommonDir - Path to Start Menu's Programs folder
@ProgramsDir - Path to current user's Programs (folder on Start Menu)
@ScriptDir - Directory containing the running script. (Result does not contain a trailing backslash)
@ScriptFullPath - Equivalent to @ScriptDir & "\" & @ScriptName
@ScriptLineNumber - Line number of the currently executed script line. Useful for debug statements specially when a function is call you can pass the caller
line number. (Not significant in complied script)
@ScriptName - Long filename of the running script.
@SEC - Seconds value of clock. Range is 00 to 59
@StartMenuCommonDir - Path to Start Menu folder
@StartMenuDir - Path to current user's Start Menu
@StartupCommonDir - Path to Startup folder
@StartupDir - Current user's Startup folder
@SW_DISABLE - Disables the window.
@SW_ENABLE - Enables the window.
@SW_HIDE - Hides the window and activates another window.
@SW_LOCK -Lock the window to avoid repainting.
@SW_MAXIMIZE - Maximizes the specified window.
@SW_MINIMIZE - Minimizes the specified window and activates the next top-level window in the Z order.
@SW_RESTORE - Activates and displays the window. If the window is minimized or maximized, the system restores it to its original size and position. An
application should specify this flag when restoring a minimized window.
@SW_SHOW - Activates the window and displays it in its current size and position.
@SW_SHOWDEFAULT - Sets the show state based on the SW_ value specified by the program that started the application.
@SW_SHOWMAXIMIZED - Activates the window and displays it as a maximized window.
@SW_SHOWMINIMIZED - Activates the window and displays it as a minimized window.
@SW_SHOWMINNOACTIVE - Displays the window as a minimized window. This value is similar to @SW_SHOWMINIMIZED, except the window is not activated.
@SW_SHOWNA - Displays the window in its current size and position. This value is similar to @SW_SHOW, except the window is not activated.
@SW_SHOWNOACTIVATE - Displays a window in its most recent size and position. This value is similar to @SW_SHOWNORMAL, except the window is not activated.
@SW_SHOWNORMAL - Activates and displays a window. If the window is minimized or maximized, the system restores it to its original size and position. An
application should specify this flag when displaying the window for the first time.
@SW_UNLOCK - Unlock windows to allow painting.
@SystemDir - Path to Windows' System (or System32) folder
@TAB Tab character, Chr(9)
@TempDir - Path to the temporary files folder.
@TRAY_ID - Last clicked item identifier during a TraySet(Item)OnEvent action.
@TrayIconFlashing - Returns 1 if tray icon is flashing; otherwise, returns 0.
@TrayIconVisible - Returns 1 if tray icon is visible; otherwise, returns 0.
@Unicode - Returns 1 if running using the Unicode version of AutoIt (AutoIt3.exe) or 0 if running the ANSI version (AutoIt3A.exe).
Usually, this macro should not be required as AutoIt handles any Unicode/ANSI conversions. However, with certain DllCalls() or use of direct Windows messages
this may be required.
@UserProfileDir - Path to current user's Profile folder.
@UserName - ID of the currently logged on user.
@WDAY - Numeric day of week. Range is 1 to 7 which corresponds to Sunday through Saturday.
@WindowsDir - path to Windows folder
@WorkingDir - Current/active working directory. (Result does not contain a trailing backslash)
@YDAY - Current day of year. Range is 1 to 366 (or 365 if not a leap year)
@YEAR - Current four-digit year



Now for the fun stuff, I'm gonna show you some of the basic commands and how to work them today.

How to make a basic GUI:
________________________________________

Start up by opening 'SciTE Script Editor'.

Now remember, if you key one thing in wrong it will throw off the ENTIRE outcome.

The first thing you'll want to type is-

#include <GUIConstants.au3>

GUICreate("My GUI Checkbox") ; you can edit in between the ""s so it will be titled differently.

$checkCN = GUICtrlCreateCheckbox ("CHECKBOX 1", 10, 10, 120, 20)

GUISetState () ; will display an dialog box with 1 checkbox and you can make more by duplicating the above code and altering the position points.

; Run the GUI until the dialog is closed
While 1
$msg = GUIGetMsg()

If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend

________________________________________

It should end up looking like this:



and the outcome like this:



If it doesn't than you've obviously written something incorrectly.


Next I'll show you how to open a hyperlink to a selected webpage (MMOwned for example).

Key in:

#include <IE.au3>

; Create a browser window and navigate to hotmail
$oIE = _IECreate()
_IENavigate($oIE, "mmowned.com")


Exit

Now if you don't plan to use Internet Explorer (IE) you'll have to change some parts but I'll leave that out for now. MF > IE

In the end it should look like this:



And it should take you to the front page of MMOwned.com, I could have added for it to log you in automatically but I know it would look like a scam so you'll
have to figure that out for yourself.

Another way to go to a web page is accessing the DOS window, it'll look like this:

$rc = _RunDos("start Http://www.mmowned.com")

I'm going to add an advanced part to this guide now its an anti afk bot for World of Warcraft and it will look something like this-

$move = Random (1, 100, 1)
If $move < 50
Send (“{RIGHT down}”)
Sleep (500)
Send (“{LCTRL}”)
Sleep (2000)
Send (“{RIGHT up}”)
Else
Send (“{LEFT down}”)
Sleep (500)
Send (“{LCTRL}”)
Sleep (2000)
Send (“{LEFT up}”)
EndIf



Now the best part of this bot is that it generates a random movement each time so that it doesn't just make you step forward every so often. Thats why whenever I make myself a bot I make sure that it has randomly generated movements in it.
I just want to state that this is more of a difficult script and wouldn't suggest attempting these on your own until you've masted the tut's and lessons.

This guide is just to show the basics in Autoit (I plan on putting more up soon for more advanced pupils). I hope you all learned something and kept up with
what I was saying.


GL everyone!

Glyn
<3



Last edited by glynbeard; 10-28-2007 at 07:33 PM..
Reply With Quote

Donate to remove ads.
Re: How To: Learn Basic AutoIt
(#2)
Old
Kbeeuts's Avatar
Kbeeuts is Offline
Contributor
Rep Power: 2
Reputation: 118
Kbeeuts will become famous soon enoughKbeeuts will become famous soon enough
 
Posts: 226
Join Date: Feb 2007
Re: How To: Learn Basic AutoIt - 10-19-2007

Nice one, I was looking into learning some AutoIt Hope to see some more advance stuff coming later.



i has a crab
Reply With Quote
Re: How To: Learn Basic AutoIt
(#3)
Old
Errage's Avatar
Errage is Offline
Stalks D[Sky] ಠ_ಠ

Rep Power: 7
Reputation: 641
Errage is a name known to allErrage is a name known to allErrage is a name known to allErrage is a name known to allErrage is a name known to allErrage is a name known to all
 
Posts: 2,028
Join Date: Jan 2007
Location: Canada
Re: How To: Learn Basic AutoIt - 10-19-2007

Nice guide, Glyn




Support MMOwned, make your next WoW Buy at MMOKings


Reply With Quote
Re: How To: Learn Basic AutoIt
(#4)
Old
glynbeard's Avatar
glynbeard is Online
[--- 純被釋放的能源 ---]
Rep Power: 5
Reputation: 401
glynbeard is just really niceglynbeard is just really niceglynbeard is just really niceglynbeard is just really niceglynbeard is just really nice
 
Posts: 1,712
Join Date: Jul 2006
Location: 任何
Re: How To: Learn Basic AutoIt - 10-19-2007

Quote:
Originally Posted by Kbeeuts View Post
Nice one, I was looking into learning some AutoIt Hope to see some more advance stuff coming later.
/same I've been so busy with school lately that I've had almost no time for MMOwned but now my schedule has opened up somewhat and I hope to be able to be more active.
Reply With Quote
Re: How To: Learn Basic AutoIt
(#5)
Old
Voumerus's Avatar
Voumerus is Offline
Knight-Champion
Rep Power: 3
Reputation: 41
Voumerus is on a distinguished road
 
Posts: 514
Join Date: Jun 2006
Location: Scotland
Re: How To: Learn Basic AutoIt - 10-19-2007

nice guide +rep ^^




[Only registered and activated users can see links. ]
[Only registered and activated users can see links. ]
Reply With Quote
Re: How To: Learn Basic AutoIt
(#6)
Old
fakey is Offline
Banned
Rep Power: 0
Reputation: 2
fakey is an unknown quantity at this point
 
Posts: 40
Join Date: Oct 2007
Re: How To: Learn Basic AutoIt - 10-19-2007

awsome that rox
Reply With Quote
Re: How To: Learn Basic AutoIt
(#7)
Old
symons is Offline
Corporal
Rep Power: 2
Reputation: 24
symons is on a distinguished road
 
Posts: 34
Join Date: Feb 2007
Location: Australia
Re: How To: Learn Basic AutoIt - 10-20-2007

Nice Guide man! BTW if you want to head to a website, easiest thing is to write
$rc = _RunDos("start Http://www.mmowned.com")




You know you've reached the pinnacle of thievery when you successfully pickpocket a watermelon from a gnome
Reply With Quote
Re: How To: Learn Basic AutoIt
(#8)
Old
glynbeard's Avatar
glynbeard is Online
[--- 純被釋放的能源 ---]
Rep Power: 5
Reputation: 401
glynbeard is just really niceglynbeard is just really niceglynbeard is just really niceglynbeard is just really niceglynbeard is just really nice
 
Posts: 1,712
Join Date: Jul 2006
Location: 任何
Re: How To: Learn Basic AutoIt - 10-20-2007

Quote:
Originally Posted by symons View Post
Nice Guide man! BTW if you want to head to a website, easiest thing is to write
= _RunDos("start Http://www.mmowned.com")
Thanks Added to a bulk of the guide.
Reply With Quote
Re: How To: Learn Basic AutoIt
(#9)
Old
moonrabbit's Avatar
moonrabbit is Offline
Sergeant Major
Rep Power: 2
Reputation: 13
moonrabbit is on a distinguished road
 
Posts: 176
Join Date: Jul 2007
Re: How To: Learn Basic AutoIt - 10-21-2007

Just a note:

"
checkCN = GUICtrlCreateCheckbox ("CHECKBOX 1", 10, 10, 120, 20) "

Should be:

"
$checkCN = GUICtrlCreateCheckbox ("CHECKBOX 1", 10, 10, 120, 20) "

if it isn't, an error pops up.


eh.
Reply With Quote
Re: How To: Learn Basic AutoIt
(#10)
Old
glynbeard's Avatar
glynbeard is Online
[--- 純被釋放的能源 ---]
Rep Power: 5
Reputation: 401
glynbeard is just really niceglynbeard is just really niceglynbeard is just really niceglynbeard is just really niceglynbeard is just really nice
 
Posts: 1,712
Join Date: Jul 2006
Location: 任何
Re: How To: Learn Basic AutoIt - 10-21-2007

Written error, changed.
Reply With Quote
Re: How To: Learn Basic AutoIt
(#11)
Old
The_Demon is Offline
Banned
Rep Power: 0
Reputation: 1
The_Demon is an unknown quantity at this point
 
Posts: 15
Join Date: Apr 2007
Location: Jungle
Re: How To: Learn Basic AutoIt - 10-21-2007

Nice ty
Reply With Quote
Re: How To: Learn Basic AutoIt
(#12)
Old
tsincaat's Avatar
tsincaat is Offline
Site Donator
Rep Power: 3
Reputation: 38
tsincaat is on a distinguished road
 
Posts: 176
Join Date: May 2006
Re: How To: Learn Basic AutoIt - 10-26-2007

If you're trying to think of more things to do, I'd advise a tutorial that makes use of a button you can click which will do something..

Another thing to recommend to people interested in making a nice GUI is KODA Gui, google it, it's awesome.
Reply With Quote
Re: How To: Learn Basic AutoIt
(#13)
Old
orkinman is Offline
Site n00b.. (A leecher if I've been here for more than a month and can't earn 5 rep)
Rep Power: 2
Reputation: 1
orkinman is an unknown quantity at this point
 
Posts: 10
Join Date: Jan 2007
Re: How To: Learn Basic AutoIt - 10-26-2007

Nice tutorial! I've been thinking of trying autoit for WoW, but I've heard that it's detectable?
Reply With Quote
Re: How To: Learn Basic AutoIt
(#14)
Old
glynbeard's Avatar
glynbeard is Online
[--- 純被釋放的能源 ---]
Rep Power: 5
Reputation: 401
glynbeard is just really niceglynbeard is just really niceglynbeard is just really niceglynbeard is just really niceglynbeard is just really nice
 
Posts: 1,712
Join Date: Jul 2006
Location: 任何
Re: How To: Learn Basic AutoIt - 10-26-2007

Quote:
Originally Posted by tsincaat View Post
If you're trying to think of more things to do, I'd advise a tutorial that makes use of a button you can click which will do something..

Another thing to recommend to people interested in making a nice GUI is KODA Gui, google it, it's awesome.
Thanks mate, I'm am looking for fresh ideas for this stuff

Quote:
Originally Posted by orkinman View Post
Nice tutorial! I've been thinking of trying autoit for WoW, but I've heard that it's detectable?
I'm not sure if you mean useing Autoit to make afk bots, fishing bots ect. and if it is in that case then bots can get you banned if something notices somethings wrong. But Autoit alone has absolutely nothing to do with WoW. It's just a basic scripting program.
Reply With Quote
Re: How To: Learn Basic AutoIt
(#15)
Old
Hallowsend's Avatar
Hallowsend is Offline
滚开! 大声笑。I 是令人敬畏的。
Rep Power: 4
Reputation: 366
Hallowsend is just really niceHallowsend is just really niceHallowsend is just really niceHallowsend is just really nice
 
Posts: 714
Join Date: Sep 2007
Location: Killing sum cats
Re: How To: Learn Basic AutoIt - 10-26-2007

yet another great thread by Glyn... tho it bothers me how your thread has like 10 replys and my epic need program list has like 1... lol +rep ne ways


Hallowsend, donkey01, NocaCow, darkone555, Flail, vyr, immachampion, TheWarden, Kuiren, Mellexx, astmahest, HolyShiat, asi29, OprahBlaze, roflcano, zubzero, Iziena, ratozor, SilverFire, berserk85, Playastyle92, hampan258
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On



Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vBulletin Skin developed by: vBStyles.com


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175