Jump to content
Sign in to follow this  
Jimbei

A window won't close

Recommended Posts

Jimbei

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

Share this post


Link to post
Share on other sites
smartee
:) take a moment to read the forum rules first, this type of discussion is prohibited here.

Share this post


Link to post
Share on other sites
Jimbei

Am I in the clear if I edit it?

Share this post


Link to post
Share on other sites
smartee

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.

Share this post


Link to post
Share on other sites
Jimbei

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.

Share this post


Link to post
Share on other sites
Jimbei

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

Share this post


Link to post
Share on other sites
Jos

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

Read the forum rules and stick to them.

Thanks

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×