Jump to content

Inputing data into documents from a GUI


ARozanski
 Share

Recommended Posts

ARozanski

Example:

#include <GuiConstantsEx.au3>

$hGUI = GUICreate("Test", 200, 100)

$Input = GUICtrlCreateInput("Hello world", 50, 30, 100, 20)

$SendButton = GUICtrlCreateButton("Send", 60, 65, 75, 23)

Run("notepad.exe")
WinWait("[CLASS:Notepad]")
$hWnd = WinGetHandle("[CLASS:Notepad]")

GUISetState()

While 1
    $msg = GUIGetMsg()
    Switch $msg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $SendButton
            $sRead = GUICtrlRead($Input)
            ControlSend($hWnd, "", "Edit1", $sRead)
    EndSwitch
WEnd
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...