You can use a timer and benefit from both
the hide and NA word options that can be specified when using the
GUI, Show command in order to achieve this:
Code: Select all
html =
(
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge"><meta charset="utf-8" />
<title>HTMLFile</title>
<style>
body {
font: normal normal normal 24px Segoe UI;
background-color: black;
}
li::before {
content: "";
}
li, p {
color: white;
}
</style>
</head>
<body>
<div class="C">
<p>SOME HTML CONTENT HERE</p>
<ul>
<li>Text: Description</li>
<li>Text: Description</li>
<li>Text: Description</li>
</ul>
</div>
</body>
</html>
)
DetectHiddenWindows, On
Loop, 2 {
GUI, % a_index . ":+LastFound -Border +ToolWindow -Caption +E0x08000000" ; specifying +toolwindow the GUI will have no taskbar button
WinSet, Transparent, 165 ; no title parameter: we use the last found window
}
DetectHiddenWindows, Off
GUI, 1:+AlwaysOnTop
GUI, 1:Color, black
GUI, 1:Add, ActiveX, w350 h300 vDoc, about:<!DOCTYPE html><meta http-equiv="X-UA-Compatible" content="IE=edge">
DOC.document.Open(), DOC.document.Write(html), DOC.document.Close() ; functions can be listed side by side using the comma operator
GUI, 2:Color, yellow
GUI, 2:Show, w%A_ScreenWidth% h%A_ScreenHeight% Hide, ; both A_ScreenWidth and A_ScreenHeight contain respectively the width and height of the primary monitor
return
a::
i := 0
SetTimer, flash, 600
Gui, 1:Show, NA
KeyWait % A_ThisHotkey
Loop, 2
Gui, %a_index%:Show, Hide
SetTimer, flash, Off
return
flash:
Gui, 2:Show, % "NA" . ((i:=!i) ? "" : "Hide") ; NA shows the window without activating it
return