By using this site you agree to the use of cookies by Brugbart and our partners.

Learn more

Autoit WinFlash Function

Use the WinFlash function, to create a flashing like effect on windows.

Edited: 2015-02-12 19:42

The WinFlash function can be used to catch the attention of the user. The flashing effect is similar to a window losing and regaining focus.


TitleThe title of the window.Required
TextThe text of the window to read.Optional
FlashesNomber of time to flash. Default is 4.Optional
DelayDelay in milliseconds. Default is 500.Optional

When to use it

If you have automated an install process with AutoIt, and you want to be able to easily tell when a computer is done, without using sound. Then WinFlash could be used in a loop, to show that the process has been completed – there are many other ways to do this though.

WinFlash is more eye candy, and its hard to imagine where its use might be considered proper.

WinFlash example

The following example script first opens notepad, then stores its window handle in a variable for later reference, and then it runs the WinFlash function, creating the flashing effect.


; Saves the window handle
$hWnd = WinWait("[CLASS:Notepad]", "", 10)

; Flashes the window
WinFlash($hWnd, "", 4, 200)