[You must be registered and logged in to see this link.]
ผมนำเอาโค้ดจากลิ้งค์ด้านบนมาพัฒนาต่อครับ แต่ติดตรงที่หลังจาก login >> ผ่าน >> กด OK >> ปิดหน้าต่าง login แล้วเปิดหน้าต่างโปรขึ้นมาแทนไม่ได้ครับ
โดยผมใส่ GUIDelete() และ _ProCombo() ต่อจาก msgbox (ที่กด OK)
แล้วก็ตามด้วย (โค้ดโดยแอตมิน POS)
พอสั่งรันสคิปก็ขึ้นแบบนี้ครับ
รบกวนแนะนำด้วยนะครับ
ผมนำเอาโค้ดจากลิ้งค์ด้านบนมาพัฒนาต่อครับ แต่ติดตรงที่หลังจาก login >> ผ่าน >> กด OK >> ปิดหน้าต่าง login แล้วเปิดหน้าต่างโปรขึ้นมาแทนไม่ได้ครับ
โดยผมใส่ GUIDelete() และ _ProCombo() ต่อจาก msgbox (ที่กด OK)
- Code:
msgbox(0,"Welcome","เข้าสู่ระบบเรียบร้อยแล้ว สวัสดีคุณ " & $UsernameInput &)
GUIDelete()
_ProCombo()
Else
MsgBox(0,"เกิดข้อผิดพลาด","เกิดข้อผิดพลา่ดจากเซิฟเวอร์ฺ กรุณาติดต่อผู้ดูแลระบบ" )
EndIf
EndIf
EndFunc ;--> _login()
แล้วก็ตามด้วย (โค้ดโดยแอตมิน POS)
- Code:
Func _ProCombo()
$Form1 = GUICreate("PSsix Combo", 324, 158, 623, 147)
GUISetBkColor(0x053B77)
$Checkbox1 = GUICtrlCreateCheckbox("1", 16, 24, 41, 17)
$Checkbox2 = GUICtrlCreateCheckbox("2", 16, 56, 41, 17)
$Checkbox3 = GUICtrlCreateCheckbox("3", 16, 88, 41, 17)
$Input1 = GUICtrlCreateInput("1", 152, 24, 65, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_NUMBER))
$Input2 = GUICtrlCreateInput("2", 152, 56, 65, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_NUMBER))
$Input3 = GUICtrlCreateInput("1", 152, 88, 65, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_NUMBER))
$Combo1 = GUICtrlCreateCombo("", 64, 24, 57, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "a|b|c|d")
$Combo2 = GUICtrlCreateCombo("", 64, 56, 57, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "a|b|c|d")
$Combo3 = GUICtrlCreateCombo("", 64, 88, 57, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "a|b|c|d")
$Label1 = GUICtrlCreateLabel(" b", 16, 120, 203, 17)
GUICtrlSetBkColor(-1, 0xFFFFFF)
$Button1 = GUICtrlCreateButton("เริ่ม", 232, 16, 75, 25)
GUICtrlSetBkColor(-1, 0x0967C5)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
combo()
EndSwitch
WEnd
EndFunc ;--> _ProCombo()
Func combo()
While 1
If GUICtrlRead($Checkbox1) = 1 Then
Send("{" & GUICtrlRead($Combo1) & "}")
GUICtrlSetData($Label1, "combo 1 *")
Sleep(GUICtrlRead($Input1) & "000")
EndIf
If GUICtrlRead($Checkbox2) = 1 then
Send("{" & GUICtrlRead($Combo2) & "}")
GUICtrlSetData($Label1, "combo 2 **")
Sleep(GUICtrlRead($Input2) & "000")
EndIf
If GUICtrlRead($Checkbox3) = 1 Then
Send("{" & GUICtrlRead($Combo3) & "}")
GUICtrlSetData($Label1, "combo 3 ***")
Sleep(GUICtrlRead($Input3) & "000")
EndIf
Sleep(10)
WEnd
EndFunc
พอสั่งรันสคิปก็ขึ้นแบบนี้ครับ
- Code:
C:\Documents and Settings\My Computer\Desktop\Loing.au3(152,32) : WARNING: $Checkbox1: possibly used before declaration.
If GUICtrlRead($Checkbox1)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\My Computer\Desktop\Loing.au3(153,40) : WARNING: $Combo1: possibly used before declaration.
Send("{" & GUICtrlRead($Combo1)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\My Computer\Desktop\Loing.au3(154,32) : WARNING: $Label1: possibly used before declaration.
GUICtrlSetData($Label1,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\My Computer\Desktop\Loing.au3(155,35) : WARNING: $Input1: possibly used before declaration.
Sleep(GUICtrlRead($Input1)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\My Computer\Desktop\Loing.au3(158,32) : WARNING: $Checkbox2: possibly used before declaration.
If GUICtrlRead($Checkbox2)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\My Computer\Desktop\Loing.au3(159,40) : WARNING: $Combo2: possibly used before declaration.
Send("{" & GUICtrlRead($Combo2)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\My Computer\Desktop\Loing.au3(161,35) : WARNING: $Input2: possibly used before declaration.
Sleep(GUICtrlRead($Input2)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\My Computer\Desktop\Loing.au3(165,32) : WARNING: $Checkbox3: possibly used before declaration.
If GUICtrlRead($Checkbox3)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\My Computer\Desktop\Loing.au3(166,40) : WARNING: $Combo3: possibly used before declaration.
Send("{" & GUICtrlRead($Combo3)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\My Computer\Desktop\Loing.au3(168,35) : WARNING: $Input3: possibly used before declaration.
Sleep(GUICtrlRead($Input3)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\My Computer\Desktop\Loing.au3(152,32) : ERROR: $Checkbox1: undeclared global variable.
If GUICtrlRead($Checkbox1)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\My Computer\Desktop\Loing.au3(153,40) : ERROR: $Combo1: undeclared global variable.
Send("{" & GUICtrlRead($Combo1)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\My Computer\Desktop\Loing.au3(154,32) : ERROR: $Label1: undeclared global variable.
GUICtrlSetData($Label1,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\My Computer\Desktop\Loing.au3(155,35) : ERROR: $Input1: undeclared global variable.
Sleep(GUICtrlRead($Input1)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\My Computer\Desktop\Loing.au3(158,32) : ERROR: $Checkbox2: undeclared global variable.
If GUICtrlRead($Checkbox2)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\My Computer\Desktop\Loing.au3(159,40) : ERROR: $Combo2: undeclared global variable.
Send("{" & GUICtrlRead($Combo2)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\My Computer\Desktop\Loing.au3(161,35) : ERROR: $Input2: undeclared global variable.
Sleep(GUICtrlRead($Input2)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\My Computer\Desktop\Loing.au3(165,32) : ERROR: $Checkbox3: undeclared global variable.
If GUICtrlRead($Checkbox3)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\My Computer\Desktop\Loing.au3(166,40) : ERROR: $Combo3: undeclared global variable.
Send("{" & GUICtrlRead($Combo3)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\My Computer\Desktop\Loing.au3(168,35) : ERROR: $Input3: undeclared global variable.
Sleep(GUICtrlRead($Input3)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\My Computer\Desktop\Loing.au3 - 10 error(s), 10 warning(s)
รบกวนแนะนำด้วยนะครับ