Jump to content

Recommended Posts

Posted (edited)

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)

 GUISetState(@SW_SHOW)
 
  While 1 ; Asks for strings
   $GUInput = GUIGetMsg()
   
   Select
   Case $GUInput = $Button_OK
        $String1 = Inputbox ("String1", "")
        $String2 = InputBox ("String2", "")
        ExitLoop
        
        
    Case  $GUInput = $Button_Cancel
        Exit
        
    EndSelect
WEnd

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}")
    
Wend
Edited by Jimbei
Posted

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.

Posted

This is, as far as I know, the ONLY place I can search for help. It would be helpful to point me out to other places if they exist.

Guest
This topic is now closed to further replies.
×
×
  • Create New...