WEEK 7 : Basic Automation using Notepad - M199205zn/IAS-CS4 GitHub Wiki
Try on your windows.
This is a simple harmless Windows batch script (.bat
) that opens multiple instances of Notepad and displays a message box using msg
command. This is a fun way to demonstrate basic automation without causing harm.
Batch Script:
@echo off
title Harmless Automation Demo
echo This is a fun harmless automation script!
echo Press Ctrl + C to stop if needed.
:: Open Notepad multiple times
for /L %%i in (1,1,5) do (
start notepad
timeout /t 1 >nul
)
:: Display a message to the user
msg * "Hello! This is a harmless script demonstration."
exit
How It Works:
- Opens Notepad five times using
start notepad
. - Adds a delay (
timeout /t 1 >nul
) to make the execution slower. - Displays a message box using
msg *
.
How to Use It:
- Copy and paste the script into Notepad.
- Save it as
harmless_script.bat
. - Double-click the file to run it.