How To: Learn Basic AutoIt menu

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 26
  1. #1
    Glynbeard's Avatar Mawd Authenticator enabled
    Reputation
    615
    Join Date
    Jul 2006
    Posts
    2,647
    Thanks G/R
    0/0
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How To: Learn Basic AutoIt

    How to AutoIt!

    Please view this guide here as well 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)

    -Download 1

    and

    -Download 2

    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 05:33 PM.

    These ads disappear when you log in.

  2. #2
    Kubiatsu's Avatar Contributor
    Reputation
    167
    Join Date
    Feb 2007
    Posts
    506
    Thanks G/R
    9/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How To: Learn Basic AutoIt

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

  3. #3
    Errage's Avatar Contributor Authenticator enabled
    Reputation
    94
    Join Date
    Jan 2007
    Posts
    2,832
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How To: Learn Basic AutoIt

    Nice guide, Glyn

    +Rep
    I used to be a Super Mod. Now I'm just Super, thanks for asking.

  4. #4
    Glynbeard's Avatar Mawd Authenticator enabled
    Reputation
    615
    Join Date
    Jul 2006
    Posts
    2,647
    Thanks G/R
    0/0
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How To: Learn Basic AutoIt

    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.

  5. #5
    GanjalfTheGreen's Avatar Active Member
    Reputation
    41
    Join Date
    Jun 2006
    Posts
    525
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How To: Learn Basic AutoIt

    nice guide +rep ^^

  6. #6
    fakey's Avatar Sergeant
    Reputation
    2
    Join Date
    Oct 2007
    Posts
    40
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How To: Learn Basic AutoIt

    awsome that rox

  7. #7
    symons's Avatar Sergeant
    Reputation
    29
    Join Date
    Feb 2007
    Posts
    40
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How To: Learn Basic AutoIt

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

  8. #8
    Glynbeard's Avatar Mawd Authenticator enabled
    Reputation
    615
    Join Date
    Jul 2006
    Posts
    2,647
    Thanks G/R
    0/0
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How To: Learn Basic AutoIt

    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.

  9. #9
    moonrabbit's Avatar Sergeant Major
    Reputation
    13
    Join Date
    Jul 2007
    Posts
    182
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How To: Learn Basic AutoIt

    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.

  10. #10
    Glynbeard's Avatar Mawd Authenticator enabled
    Reputation
    615
    Join Date
    Jul 2006
    Posts
    2,647
    Thanks G/R
    0/0
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How To: Learn Basic AutoIt

    Written error, changed.

  11. #11
    The_Demon's Avatar Corporal
    Reputation
    1
    Join Date
    Apr 2007
    Posts
    15
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How To: Learn Basic AutoIt

    Nice ty

  12. #12
    tsincaat's Avatar Contributor

    Reputation
    82
    Join Date
    May 2006
    Posts
    283
    Thanks G/R
    2/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How To: Learn Basic AutoIt

    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.

  13. #13
    orkinman's Avatar Private
    Reputation
    1
    Join Date
    Jan 2007
    Posts
    10
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How To: Learn Basic AutoIt

    Nice tutorial! I've been thinking of trying autoit for WoW, but I've heard that it's detectable?

  14. #14
    Glynbeard's Avatar Mawd Authenticator enabled
    Reputation
    615
    Join Date
    Jul 2006
    Posts
    2,647
    Thanks G/R
    0/0
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How To: Learn Basic AutoIt

    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

    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.

  15. #15
    Hallowsend's Avatar 滚开! 大声笑。I 是令人敬畏的。
    Reputation
    366
    Join Date
    Sep 2007
    Posts
    720
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How To: Learn Basic AutoIt

    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

Page 1 of 2 12 LastLast

Similar Threads

  1. [How-To] The basics maximize you're GPH in Core of Arreat
    By j0achim in forum Diablo 3 Guides
    Replies: 7
    Last Post: 06-11-2012, 05:52 PM
  2. How to learn C#?
    By lollollol1 in forum Programming
    Replies: 6
    Last Post: 04-05-2010, 03:32 PM
  3. [Guide] Learning Basic C++
    By 7itanium in forum Programming
    Replies: 15
    Last Post: 09-13-2009, 12:34 AM
  4. Learning basic c++!
    By Syllabus in forum Programming
    Replies: 4
    Last Post: 07-16-2008, 01:48 PM
All times are GMT -5. The time now is 11:49 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2021 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2021 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search