- GUI:
- #include
#include
#include
#include
#include
#Region ### START Koda GUI section ### Form=c:\program files (x86)\autoit3\forms\form2.kxf
$Form1_1 = GUICreate("Form1", 213, 122, 192, 124)
GUISetBkColor(0x99B4D1)
$Label1 = GUICtrlCreateLabel("เลือกมอน", 16, 8, 80, 32)
GUICtrlSetFont(-1, 20, 800, 0, "TH Baijam")
GUICtrlSetColor(-1, 0x000000)
$Label2 = GUICtrlCreateLabel("ตีมอน", 15, 43, 51, 32)
GUICtrlSetFont(-1, 20, 800, 0, "TH Baijam")
GUICtrlSetColor(-1, 0x000000)
$TAB = GUICtrlCreateInput("", 112, 16, 81, 21)
$W = GUICtrlCreateInput("", 112, 48, 81, 21)
$START = GUICtrlCreateButton("เริ่ม", 24, 80, 57, 33)
GUICtrlSetFont(-1, 16, 800, 0, "TH Baijam")
GUICtrlSetColor(-1, 0x000000)
GUICtrlSetBkColor(-1, 0x00FF00)
$Button1 = GUICtrlCreateButton("ออก", 144, 80, 49, 33)
GUICtrlSetFont(-1, 16, 800, 0, "TH Baijam")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0xFF0000)
Dim $Form1_1_AccelTable[1][2] = [["{F7}", $START]]
GUISetAccelerators($Form1_1_AccelTable)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
- Script:
- #region --- Au3Recorder generated code Start (v3.3.9.5 KeyboardLayout=00000409) ---
#region --- Internal functions Au3Recorder Start ---
Func _Au3RecordSetup()
Opt('WinWaitDelay',100)
Opt('WinDetectHiddenText',1)
Opt('MouseCoordMode',0)
Local $aResult = DllCall('User32.dll', 'int', 'GetKeyboardLayoutNameW', 'wstr', '')
If $aResult[1] <> '00000409' Then
MsgBox(64, 'Warning', 'Recording has been done under a different Keyboard layout' & @CRLF & '(00000409->' & $aResult[1] & ')')
EndIf
EndFunc
Func _WinWaitActivate($title,$text,$timeout=0)
WinWait($title,$text,$timeout)
If Not WinActive($title,$text) Then WinActivate($title,$text)
WinWaitActive($title,$text,$timeout)
EndFunc
_AU3RecordSetup()
#endregion --- Internal functions Au3Recorder End ---
HotKeySet('{F8}', 'Quit')
HotKeySet('{F7}', 'Pause')
Global $Paused
$d3 = WinActivate("SO3D","")
Pause()
While 1
ControlSend($d3, "", "", "{TAB}")
Sleep(1000) <<<< ตรงนี้อยากกำหนดเองในหน้าต่าง Input GUI
ControlSend($d3, "", "", "w")
Sleep(100) <<<< ตรงนี้อยากกำหนดเองในหน้าต่าง Input GUI
WEnd
Func Quit()
Exit
EndFunc ;==>Quit
Func Pause()
$Paused = Not $Paused
While $Paused
Sleep(100)
ToolTip('Paused', 0, 0)
WEnd
ToolTip("")
EndFunc ;==>Pause")")")#endregion --- Au3Recorder generated code End ---
แนะนำผมทีผมจะเอาไปยัดใส่ GUI ยังไง มือใหม่ อ่านหนังสือแล้วยังงง ขอชมตัวอย่างสักอันนะครับ
ผมพึ่งหัดทำ GUI ครั้งแรกครับ ขอผู้เชี่ยวชาญ แนะนำด้วยนะครับ