Hello I like to know how can I delay a work (or a command) for a specified time in Inno Setup Pascal Script.
The built in Sleep(const Milliseconds: LongInt)
freezes all work while sleeping.
And the following function I implemented also makes the WizardForm
unresponsive but not freezing like built in Sleep()
Function.
procedure SleepEx(const MilliSeconds: LongInt);
begin
ShellExec('Open', 'Timeout.exe', '/T ' + IntToStr(MilliSeconds div 1000), '', SW_HIDE,
ewWaitUntilTerminated, ErrorCode);
end;
I also read this, but can't think how to use it in my function.
I like to know how can I use WaitForSingleObject
in this SleepEx
function.
Thanks in advance for your help.