Last active
December 28, 2024 20:30
-
-
Save Minobi/b8adb3a8f3be01c46c4212fdec13ea12 to your computer and use it in GitHub Desktop.
HTA monitor testing app that consistently on left/right buttons click displays full-screen RGB colors
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Monitor test</title> | |
<HTA:APPLICATION | |
APPLICATIONNAME="Monitor test" | |
CAPTION="no" | |
SCROLL="no" | |
SINGLEINSTANCE="yes" | |
WINDOWSTATE="maximize" | |
INNERBORDER="no" | |
BORDER="no" | |
/> | |
<meta charset="utf-8" /> | |
</head> | |
<body></body> | |
<script type="text/VBScript" language="VBScript"> | |
Dim RgbColors, Index | |
RgbColors = Array("#000000", "#ffffff", "#ff0000", "#00ff00", "#0000ff") | |
Index = 0 | |
document.body.bgColor = rgbColors(0) | |
Sub Document_OnKeyUp() | |
intKeyCode = Window.Event.Keycode | |
If intKeyCode = 37 Then | |
If Index > 0 Then | |
Index = Index - 1 | |
Else | |
Index = UBound(RgbColors) | |
End If | |
End If | |
If intKeyCode = 39 Then | |
If Index < UBound(RgbColors) Then | |
Index = Index + 1 | |
Else | |
Index = 0 | |
End If | |
End If | |
If intKeyCode = 27 Then Window.Close | |
document.body.bgColor = rgbColors(index) | |
End Sub | |
</script> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment