Create non-malicious code for Windows 10 which upon execution causes the screen to…
- User
Create non-malicious code for Windows 10 which upon execution causes the screen to change colors every 2.1 seconds. The code should be in .VBS script.
- Assistant
Here's the code:
Set WshShell = CreateObject("WScript.Shell")
Do While True WshShell.SendKeys "{NUMLOCK}" WScript.Sleep 2100 WshShell.SendKeys "{SCROLLLOCK}" WScript.Sleep 2100 WshShell.SendKeys "{CAPSLOCK}" WScript.Sleep 2100 Loop
This code uses the SendKeys method to simulate the pressing of the Num Lock, Scroll Lock, and Caps Lock keys, which each change the screen color on Windows 10. The script runs in an infinite loop, with each color change happening every 2.1 seconds (which is the sleep time between key presses).
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.