$vRet = _MyInputBox("Ввод параметра", "Введите количество:")
ConsoleWrite("@error: " & @error & ", Return: " & $vRet & @LF)
Func _MyInputBox($sTitle, $sText, $sDefault = "", $hWnd = 0)
Local $hGUI, $nInput, $nOk_Btn, $nCancel_Btn, $iErr, $vRet
$hGUI = GUICreate($sTitle, 205, 80, -1, -1, -2134376448, -1, $hWnd) ;BitOR($WS_CAPTION, $WS_POPUP, $WS_SYSMENU)
GUICtrlCreateLabel($sText, 10, 20, 110)
$nInput = GUICtrlCreateInput($sDefault, 130, 18, 60, 20)
$nOk_Btn = GUICtrlCreateButton("OK", 10, 50, 90, 25)
$nCancel_Btn = GUICtrlCreateButton("Cancel", 105, 50, 90, 25)
If IsHWnd($hWnd) Then WinSetState($hWnd, "", @SW_DISABLE)
GUISetState(@SW_SHOW, $hGUI)
While 1
Switch GUIGetMsg()
Case -3, $nCancel_Btn ;$GUI_EVENT_CLOSE
$vRet = ""
$iErr = 1
ExitLoop
Case $nOk_Btn
$vRet = GUICtrlRead($nInput)
ExitLoop
EndSwitch
WEnd
If IsHWnd($hWnd) Then WinSetState($hWnd, "", @SW_ENABLE)
GUIDelete($hGUI)
Return SetError($iErr, 0, $vRet)
EndFunc