ต้องการเขียน ข้อความลงไปใน Input แล้วให้มัน Send ไปยัง กล่องข้อความของโปรแกรม โดยระบุ X,Y อะครับ ใช้ Button ในการ Send
2 posters
สอนวิธีการเขียนสคิป Send ข้อความหน่อยครับ
nongtomz- มือใหม่เพิ่งสมัคร
จำนวนข้อความ : 1
ความนิยม : 0
เข้าร่วมเมื่อ : 15/10/2015
sak- PSsix Member Class II
จำนวนข้อความ : 34
ความนิยม : 0
เข้าร่วมเมื่อ : 26/11/2017
nongtomz พิมพ์ว่า:ต้องการเขียน ข้อความลงไปใน Input แล้วให้มัน Send ไปยัง กล่องข้อความของโปรแกรม โดยระบุ X,Y อะครับ ใช้ Button ในการ Send
ใช้ AU3Info ลองจับไปทีช่องกรอกข้อความ (edit inputbox)ของโปรแกรมดูว่า มี ClassId ปรากฏอยู่หรือไม่
ถ้ามี ก็สามารถใช้คำสั่ง ControlSend หรือ Send ในการส่งข้อความได้
Example:
- Code:
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("SendToGet", 208, 74, 192, 124)
$Input1 = GUICtrlCreateInput("", 16, 8, 177, 21)
$Button1 = GUICtrlCreateButton("Button1", 64, 40, 75, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
$Form2 = GUICreate("GetToSend", 208, 74, -1, -1)
$Input2 = GUICtrlCreateInput("", 16, 8, 177, 21)
GUISetState()
ControlFocus("SendToGet", "", "[CLASS:Edit; INSTANCE:1]")
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
ControlFocus("GetToSend", "", "[CLASS:Edit; INSTANCE:1]")
ControlSetText("GetToSend", "", "[CLASS:Edit; INSTANCE:1]", GUICtrlRead($Input1))
EndSwitch
WEnd
|
|