Skip navigation

JSI Tip 8169. How can I flash the Start button N times to attract attention?


If you have a long running script that prompts for input, you might want to attract attention by flashing the Start button.

I have scripted FlashStartButton.bat and FlashStartButtonStart.bat to flash the Start button.

The syntax for using FlashStartButton.bat is:

call FlashStartButton Times, where Times is the number of times you want to flash the Start button.

NOTE: FlashStartButton.bat uses the START command to begin the FlashStartButtonStart.bat process, so it must be in a folder that is in your PATH.

NOTE FlashStartButtonStart.bat uses Startbt.exe, which must be in a folder that is in your PATH.

NOTE: You may also want to bring your script window to the foreground, as in the following scriptlet:

@echo off
TITLE This is a test
....
....
:loop
if "%EOL%" EQU "Y" goto prompt
...
...
goto loop
:prompt
call FlashStartButton 10
activate /t:"This is test"
:ask
set /p answer=Are there any errors?
if /i "%answer%" EQU "Y" goto Errors
if /i "%answer%" EQU "N" goto Finish
goto ask
...
...

FlashStartButton.bat contains:
@echo off
if \{%1\}==\{\} @echo Syntax: call StartFlashButton Times&goto :EOF
start /min flashstartbuttonstart.bat %1
FlashStartButtonStart.bat contains:
@echo off
for /l %%a in (1,1,%1) do (
 call :loop
)
exit
:loop
startbt /hide
@ping -n 2 127.0.0.1>nul
startbt /show
@ping -n 2 127.0.0.1>nul



Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish