First AutoIt Script

This is a discussion on First AutoIt Script within the General Chat board part of the General category; This is my first AutoIt script, and basically it's worthless. I am still learning about AutoIt code and I will ...

Results 1 to 3 of 3
  1. #1
    Toxik's Avatar
    Toxik is offline Old News
    Array
    Join Date
    Apr 2007
    Location
    Ohio
    Posts
    1,699
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    14
    Reputation
    803

    First AutoIt Script

    This is my first AutoIt script, and basically it's worthless. I am still learning about AutoIt code and I will be posting useful things soon!

    Download: Download ToxikNotepad.exe -- First AutoIt Script {Mirror1}

    Questions? Comments? Concerns? E-mail Me At [email protected]!


    Source (In AutoIt SciTE Script Editor)

    Code:
    ;
    ; AutoIt Version: 3.0
    ; Language:       English
    ; Compatible (To all):       WinXP/NT
    ; By:         Brett R. (AKA Toxik) ([email protected])
    ;
    ; Script Function:
    ;   Opens Notepad, types in some text and then quits.
    ;
    
    
    ; Prompt the user to run the script - use a Yes/No prompt (4 - see help file)
    $answer = MsgBox(4, "Usage", "This will run an AWESOME notepad version. Still run this file?")
    
    
    ; Check the user's answer to the prompt (see the help file for MsgBox return values)
    ; If "No" was clicked (7) then exit the script
    If $answer = 7 Then
        MsgBox(0, "AutoIt", "OK.  Bye!")
        Exit
    EndIf
    
    
    ; Run Notepad
    Run("notepad.exe")
    
    
    ; Wait for the Notepad become active - it is titled "Untitled - Notepad" on English systems
    WinWaitActive("Untitled - Notepad")
    
    
    ; Now that the Notepad window is active type some text
    Send("This is my first AutoIt script. I will be using this to write tutorials{ENTER}:) Enjoy :){ENTER} From Toxik @ D3Scene / D2-Link")
    Sleep(500)
    Send("+{UP 2}")
    Sleep(500)
    
    
    ; Now quit by pressing Alt-f and then x (File menu -> Exit)
    Send("!f")
    Send("x")
    
    
    ; Now a screen will pop up and ask to save the changes, the window is called 
    ; "Notepad" and has some text "Yes" and "No"
    WinWaitActive("Notepad", "No")
    Send("n")
    
    
    ; Now wait for Notepad to close before continuing
    WinWaitClose("Untitled - Notepad")
    
    
    ; Finished!




  2. #2
    Volund's Avatar
    Volund is offline Banned

    Array
    Join Date
    May 2007
    Location
    in my own pants...
    Posts
    5,090
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    19
    Reputation
    1484
    thats pretty damn close to the help file... and why bother with notes?

  3. #3
    Ryan's Avatar
    Ryan is offline Ubiquitous


    Array
    Join Date
    Jul 2007
    Posts
    6,966
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    26
    Reputation
    2758
    owned?


Similar Threads

  1. [Bot/Autoit Script] PVP Honor Leeching Script
    By tschoerk in forum WoW Bots
    Replies: 36
    Last Post: 11-30-2011, 11:00 PM
  2. [Realese]Anti-Dupe Script
    By cblt in forum Mu Archives
    Replies: 3
    Last Post: 09-07-2009, 09:00 AM
  3. Antfamous Gauntlet Bot v1.8 for mmBot
    By tschoerk in forum Diablo 2 Hacks
    Replies: 9
    Last Post: 04-29-2009, 02:33 PM
  4. Write your own ASM script!
    By Ginzo in forum WoW Guides
    Replies: 2
    Last Post: 05-23-2007, 05:36 PM
  5. [Tool] AutoIt v3
    By tschoerk in forum Operating Systems
    Replies: 6
    Last Post: 03-24-2007, 09:24 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •