Что нового

Выполнения прогресса в сопровождении с звуковым сигналом

Автор
R

renom

Новичок
Сообщения
127
Репутация
2
И так тоже не вышло:

Код:
#include <BlockInputEx.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

If ($CmdLine[0]) And ($CmdLine[1] = '/send') Then
    _Send()
    Exit
EndIf

Func _Send()
_BlockInputEx( 2 ) 
sleep(5000)
_BlockInputEx( 0 ) 
EndFunc
$Form1 = GUICreate("test title", 280, 166)
$Label1 = GUICtrlCreateLabel("Отсчет пошел", 51, 22, 171, 33)
GUICtrlSetFont(-1, 18, 400, 0, "MS Sans Serif")
$Label2 = GUICtrlCreateLabel("10", 121, 79, 32, 36, $SS_CENTER)
GUICtrlSetFont(-1, 20, 400, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)

for $i = 9 to 0 step -1
    Sleep(1000)
    GUICtrlSetData($Label2, $i)
Next

GUISetState(@SW_HIDE)
 

VladUs

Скриптер
Сообщения
621
Репутация
181
Твой цикл ничего не держит
Организуй цикл...

Вот код

Код:
#include <BlockInputEx.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>



If ($CmdLine[0]) And ($CmdLine[1] = '/send') Then
    _Send()
    Exit
EndIf

Func _Send()
_BlockInputEx( 2 ) 
sleep(5000)
_BlockInputEx( 0 ) 
EndFunc
$Form1 = GUICreate("test title", 280, 166)
$Label1 = GUICtrlCreateLabel("Отсчет пошел", 51, 22, 171, 33)
GUICtrlSetFont(-1, 18, 400, 0, "MS Sans Serif")
$Label2 = GUICtrlCreateLabel("10", 121, 79, 32, 36, $SS_CENTER)
GUICtrlSetFont(-1, 20, 400, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)

for $i = 9 to 0 step -1
    Sleep(1000)
    GUICtrlSetData($Label2, $i)
Next

GUISetState(@SW_HIDE)


while 1
sleep(100)
wend
 
Автор
R

renom

Новичок
Сообщения
127
Репутация
2
мм...может не правильно понял...нужно чтобы пока шел отсчет мышь+клава блокировалась.Закончился отсчет - закончился блок.
 

VladUs

Скриптер
Сообщения
621
Репутация
181
Код:
#include <BlockInputEx.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

$Form1 = GUICreate("test title", 280, 166)
$Label1 = GUICtrlCreateLabel("Отсчет пошел", 51, 22, 171, 33)
GUICtrlSetFont(-1, 18, 400, 0, "MS Sans Serif")
$Label2 = GUICtrlCreateLabel("10", 121, 79, 32, 36, $SS_CENTER)
GUICtrlSetFont(-1, 20, 400, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)


while 1
	_BlockInputEx( 2 ) 
for $i = 9 to 0 step -1
    Sleep(1000)
    GUICtrlSetData($Label2, $i)
	
Next
ExitLoop
wend
_BlockInputEx( 0 )
GUISetState(@SW_HIDE)
 
Верх