Made another modification using using example from Bryce's GUI_Password script.When the script is done, it replaces the progress bar with a DONE button, which closes the window and allows the script to end.
If you want to, you can put a SetConsole("hide") at the begining of the script.
Replace:
code:
? "Pause..."
get $x
With:
code:
GOSUB "WaitForDone"
And replace the progress sub with the following:
code:
;----------
:Progress
;----------
IF $Percent = "100"
$StatusMessage = '$StatusMessage<FORM name=frm><input id=done type=button value=" DONE! " onclick="frm.status.value=1"><input type=hidden id=status name=status value=0></FORM>'
ELSE
$StatusMessage = '$StatusMessage<TABLE border=1 width=100% CELLSPACING=0 CELLPADDING=0><TR height=20 WIDTH=100%><TD WIDTH=$percent% BGCOLOR=Blue> </td><TD BGCOLOR=silver> </TD></TR></TABLE>'
ENDIF
$Status = "Message Center ($percent% complete)"
$nul = oleputproperty ( $frmMessage, "innerhtml", "s", '<font color="#FFFFFF"><strong>$Status</strong></font>' )
$nul = oleputproperty ( $frmStatus, "innerhtml", "s", '<font color="#FFFF00">$StatusMessage</font>' )
sleep 1
return;---------
:WaitForDone
;---------
while setfocus("$welcome") <> 0 loop
$Status = olegetproperty (val("&" + olecallfunc($doc,"GetElementById","s","status")), "value" )
; Main Command Loop
while @error = 0 and $Status = "0"
$Status = olegetproperty (val("&" + olecallfunc($doc,"GetElementById","s","status")), "value" )
;? $Status
loop
return
Mark P.