QB64 Phoenix Edition
Makes shift lights blink in a binary pattern - Printable Version

+- QB64 Phoenix Edition (https://qb64phoenix.com/forum)
+-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1)
+--- Forum: Code and Stuff (https://qb64phoenix.com/forum/forumdisplay.php?fid=3)
+---- Forum: Programs (https://qb64phoenix.com/forum/forumdisplay.php?fid=7)
+---- Thread: Makes shift lights blink in a binary pattern (/showthread.php?tid=2771)



Makes shift lights blink in a binary pattern - eoredson - 06-04-2024

Here is a fun post that makes the shift lights blink in a binary pattern:

Code: (Select All)
Rem makes shift lights blink in a binary pattern.
Color 15, 1
Print "Blink lights.."
Color , 0
Color 14
C = 8 ' set default color.
Do
  ' rotate color.
  C = C + 1
  If C = 15 Then C = 9
  Color C
  For x = 0 To 7
      Select Case x
        Case 0 ' off
            _Numlock Off
            _CapsLock Off
            _Scrolllock Off
            Print "Numlock Off  Capslock Off  Scrolllock Off"
        Case 1
            _Numlock On
            _CapsLock Off
            _Scrolllock Off
            Print "Numlock On  Capslock Off  Scrolllock Off"
        Case 2
            _Numlock Off
            _CapsLock On
            _Scrolllock Off
            Print "Numlock Off  Capslock On  Scrolllock Off"
        Case 3
            _Numlock Off
            _CapsLock Off
            _Scrolllock On
            Print "Numlock Off  Capslock Off  Scrolllock On"
        Case 4
            _Numlock On
            _CapsLock On
            _Scrolllock Off
            Print "Numlock On  Capslock On  Scrolllock Off"
        Case 5
            _Numlock On
            _CapsLock Off
            _Scrolllock On
            Print "Numlock On  Capslock Off  Scrolllock On"
        Case 6
            _Numlock Off
            _CapsLock On
            _Scrolllock On
            Print "Numlock Off  Capslock On  Scrolllock On"
        Case 7 ' all on
            _Numlock On
            _CapsLock On
            _Scrolllock On
            Print "Numlock On  Capslock On  Scrolllock On"
      End Select
      _Delay 1.5
      If Len(InKey$) Then
        _Numlock Off
        _CapsLock Off
        _Scrolllock Off
        Color 7
        End
      End If
  Next
Loop
End
Enjoy! Erik.


RE: Makes shift lights blink in a binary pattern - SMcNeill - 06-04-2024

Moved this to the PROGRAM forum, as it's not a GAME.  Smile