ยกตัวให้ทีครับ ขอบคุณครับ
อย่างเช่น พิมข้อความเข้า input
ไปใส่ notepad
อย่างเช่น พิมข้อความเข้า input
ไปใส่ notepad
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Run("notepad.exe")
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Send text to Notepad", 289, 228, -1, -1)
$Button1 = GUICtrlCreateButton("Send", 96, 160, 99, 41)
$Edit1 = GUICtrlCreateEdit("", 48, 32, 185, 89)
GUICtrlSetData(-1, "Write something....")
GUISetState(@SW_SHOW)
WinSetOnTop($Form1, "", 1)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
ProcessClose("notepad.exe")
Exit
Case $Button1
ControlSend("[CLASS:Notepad]", "", "Edit1", GUICtrlRead($Edit1) & @CRLF)
EndSwitch
WEnd
|
|