OPERATING SYSTEMSOS Windows

Best Notepad Programming Tricks to have some fun


Developers often use Notepad to write and compile code for their apps. But it’s using is not just limited to them, even not so tech-savvy users can use the application to perform some fun tricks. Below you can find the list of 5 interesting notepad programming tricks.

Notepad Programming Tricks

Try our 5 interesting Notepad programming tricks to either impress friends or surprise your people around you.

  1. Typing Slow
  2. Matrix Animation
  3. Keyboard Disco Trick
  4. Password Generator
  5. Shutdown PC using Notepad

Open Notepad, copy-paste the following in it, and save it as a .bat file. Once you click to open the bat file, get ready for a surpeize.

1] Typing Slow

As the name suggests, this trick delays the typing response by a fraction of seconds. To try it out, just copy and paste the text below into notepad and save it as a .vbs file.

WScript.Sleep 180000
WScript.Sleep 10000
Set WshShell = WScript.CreateObject(“WScript.Shell”)
WshShell.Run “notepad”
WScript.Sleep 100
WshShell.AppActivate “Notepad”
WScript.Sleep 500
WshShell.SendKeys “Hel”
WScript.Sleep 500
WshShell.SendKeys “lo ”
WScript.Sleep 500
WshShell.SendKeys “, ho”
WScript.Sleep 500
WshShell.SendKeys “w a”
WScript.Sleep 500
WshShell.SendKeys “re ”
WScript.Sleep 500
WshShell.SendKeys “you”
WScript.Sleep 500
WshShell.SendKeys “? ”
WScript.Sleep 500
WshShell.SendKeys “I a”
WScript.Sleep 500
WshShell.SendKeys “m g”
WScript.Sleep 500
WshShell.SendKeys “ood”
WScript.Sleep 500
WshShell.SendKeys ” th”
WScript.Sleep 500
WshShell.SendKeys “ank”
WScript.Sleep 500
WshShell.SendKeys “s! “

2] The Matrix animation

Matrix Animation

The Matrix movie was a sci-fi masterpiece that’s hard to recreate but some of its elements can be incorporated into Windows Notepad application via a simple line of code. All you need to do is
Copy and paste this code into Notepad:

@echo off
color 02
:tricks
echo %random%%random%%random%%random%%random%%random%%random%%random%
goto start

Then, simply save the file with the .bat extension.

Now, when you double-click the file to open it, you’ll see numbers in motion.

3] Keyboard Disco trick

Some LED keyboards can be configured to flash keys in a rhythmic way. For example, when you copy-paste or activate this simple Visual Basic Script in a Notepad file, the LEDs of your Caps Lock, Scroll lock, and Num lock keys flash in a choreographed sequence or appear to be doing disco.

Set wshShell =wscript.CreateObject("WScript.Shell")
do
wscript.sleep 100
wshshell.sendkeys "{CAPSLOCK}"
wshshell.sendkeys "{NUMLOCK}"
wshshell.sendkeys "{SCROLLLOCK}"
loop

Save as a .vbs file.

Now, double-click the saved file to enjoy the view.

4] Password Generator

Password Generator

Creating a strong and unique password can be a task for some users. So, if you would like to create a password generator, try this handy trick in Notepad.

Paste the following code in a Notepad file.

@echo off
:Start2
cls
goto Start
:Start
title Password Generator
echo I will make you a new password.
echo Please write the password down somewhere in case you forget it.
echo ----------------------------------------¬-----------------------
echo 1) 1 Random Password
echo 2) 5 Random Passwords
echo 3) 10 Random Passwords
echo Input your choice
set input=
set /p input= Choice:
if %input%==1 goto A if NOT goto Start2
if %input%==2 goto B if NOT goto Start2
if %input%==3 goto C if NOT goto Start2
:A
cls
echo Your password is %random%
echo Now choose what you want to do.
echo 1) Go back to the beginning
echo 2) Exit
set input=
set /p input= Choice:
if %input%==1 goto Start2 if NOT goto Start 2
if %input%==2 goto Exit if NOT goto Start 2
:Exit
exit
:B
cls
echo Your 5 passwords are %random%, %random%, %random%, %random%, %random%.
echo Now choose what you want to do.
echo 1) Go back to the beginning
echo 2) Exit
set input=
set /p input= Choice:
if %input%==1 goto Start2 if NOT goto Start 2
if %input%==2 goto Exit if NOT goto Start 2
:C
cls
echo Your 10 Passwords are %random%, %random%, %random%, %random%, %random%, %random%, %random%, %random%, %random%, %random%
echo Now choose what you want to do.
echo 1) Go back to the beginning
echo 2) Exit
set input=
set /p input= Choice:
if %input%==1 goto Start2 if NOT goto Start 2
if %input%==2 goto Exit if NOT goto Start 2

Save this file with .bat extension.

Then, double-click the file.

5] Shut down PC using Notepad

This Notepad trick code lets you shut down your PC in an instant without having to click the Shutdown button and then OK. Just save the file with .vbs extension and press it when you need to shut down the system. It will work as a switch!

@echo off
msg * System will now shut down
shutdown -c “Bye!” –s

Do you have more tricks to share with us? Write about them in the comments section below!

Read next: Notepad Tips and Tricks for Windows 10 users.

Matrix Animation

Source link

Leave a Reply

Your email address will not be published. Required fields are marked *