Sign in to follow this  
Followers 0
ARozanski

Inputing data into documents from a GUI

3 posts in this topic

Sorry about the newbishness...i am very new - I was wondering how i can write data a document such as notepad from a GUI input...

Share this post


Link to post
Share on other sites



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

Share this post


Link to post
Share on other sites

Thanks alot...!! :P

Share this post


Link to post
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
Sign in to follow this  
Followers 0