อยากทราบคำสั่ง send ตัวเลขแบบอัตโนมัตเช่น ผมคลิกเมาส์ 1 ครั้ง แล้วให้พิม 0001 และคลิกอีกครั้ง ให้พิม 0002 เรียงไปเรื่อยๆ แบบนี้ ไม่รทราบว่า ต้องใช้คำสั่งไหน เขียนสคริปประมาณไหนครับผม
2 posters
รบกวนผู้รู้ เขียนคำสั่ง send ตัวเลขแบบเรียงให้ทีครับผม
namasia- มือใหม่เพิ่งสมัคร
จำนวนข้อความ : 1
ความนิยม : 0
เข้าร่วมเมื่อ : 11/08/2015
sak- PSsix Member Class II
จำนวนข้อความ : 34
ความนิยม : 0
เข้าร่วมเมื่อ : 26/11/2017
namasia พิมพ์ว่า:อยากทราบคำสั่ง send ตัวเลขแบบอัตโนมัตเช่น ผมคลิกเมาส์ 1 ครั้ง แล้วให้พิม 0001 และคลิกอีกครั้ง ให้พิม 0002 เรียงไปเรื่อยๆ แบบนี้ ไม่รทราบว่า ต้องใช้คำสั่งไหน เขียนสคริปประมาณไหนครับผม
ลองรันทดสอบดูครับ
- Code:
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 208, 74, 192, 124)
$Input1 = GUICtrlCreateInput("0000", 16, 8, 177, 21)
$Button1 = GUICtrlCreateButton("Button1", 64, 40, 75, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
Local $count = 0
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$count = $count + 1
if $count < 100 then
GUICtrlSetData($Input1, "000" & $count)
If $count > 9 Then GUICtrlSetData($Input1, "00" & $count)
Else
If $count < 1000 then
GUICtrlSetData($Input1, "0" & $count)
Else
GUICtrlSetData($Input1, $count)
EndIf
EndIf
EndSwitch
WEnd
|
|