Jump to content

Recommended Posts

I'm trying to build a bot that harvests two strings to notepad

#include <GUIConstantsEx.au3>
#include <GUIConstants.au3>

GUICreate("GUI 1", 200, 100)
 GUICtrlCreateLabel("Hello world! How are you?", 30, 10)
 $Button_OK = GUICtrlCreateButton("OK", 90, 50, 60)
 $Button_Cancel = GUICtrlCreateButton("Cancel", 20, 50, 60)

  While 1 ; Asks for strings
   $GUInput = GUIGetMsg()
   Case $GUInput = $Button_OK
        $String1 = Inputbox ("String1", "")
        $String2 = InputBox ("String2", "")
    Case  $GUInput = $Button_Cancel

While 2 ; Sumbits information to Notepad
    Run ("Notepad.exe")
    WinWaitActive ("Untitled - Notepad")
    Send ($String1)
    Send ("{ENTER}")
    Send ($String2)
    Send ("^s")
    WinWaitActive ("Save as")
    ControlSend("Untitled - Notepad", "", "[CLASS:File; INSTANCE:4]")
    Winwaitactive ("Save As")
    Send ("Strings'n'rope'n'stuff") ; the file name
    Send ("{ENTER}")
Edited by Jimbei
Link to post
Share on other sites

Am I in the clear if I edit it?

Your question is far from specific to gaming, so maybe, but then again we all know your intentions; so most likely you're better off searching for help elsewhere :) Rules are rules.

Link to post
Share on other sites
  • Developers

Yes, but at this point, it can't even login, much less automate anything.

Read the forum rules and stick to them.



SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
Live for the present,
Dream of the future,
Learn from the past.

Link to post
Share on other sites
This topic is now closed to further replies.
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...