In most programming books, you will find an example of a simple “Hello world!” program. Here are the instructions for “Hello world!” in uniPaaS. Easy video editing software.
- How To Use Notepad++ For HTML
- How To Code A Website Using Notepad
- How To Create Software
- Create A Webpage Using Notepad
- How Do I Create A Computer Program?
- See More Results
Hint: While you are just starting out in uniPaaS, always remember the F1 Help key! There is a lot of context-sensitive information available just a keystroke away.
Download this app from Microsoft Store for Windows 10, Windows 8.1, Windows 10 Mobile, Windows 10 Team (Surface Hub). See screenshots, read the latest customer reviews, and compare ratings for Notepad. It is a text tutorial showing how how to create a simple program using Microsoft Windows notepad.It works in Windows XP too!!!!!
Creating “Hello world!” in uniPaaS
- Go to the Program repository (Shift+F3), to the spot where you want to create your new program.
- Press F4 (Edit->Create Line) to open up a new line.
- Type in the name of your program, in this case, Hello World. uniPaaS does not use this name internally, so you can use any naming convention you like.
- Press zoom (F5, double-click) to open up your new program.
- Because this is a new program, the Task Properties dialog box will open up. You can just escape or click OK; the defaults will be fine for a simple program.
- Next you will see your new program. Notice the three tabs at the top: Data View, Logic, and Forms. This is where you will do your coding in uniPaaS.
Creating the Data View
- First, let’s set up the data view. Click on the Data view tab. Note that there is already a Main Source line. You can ignore that, because we are not using a data source in this example.
- Press F4. This will open up a line.
- In the pull-down box, select Virtual. This means we are creating a temporary variable. Tab to the next field.
- Give your virtual a name. We called ours Display Field.
- Tab twice, to the field that says Alpha. This is the data attribute, which is alpha by default. You can click on the pull-down here to see the other choices. Tab again. Now you will be on the Picture field. Type in 40. This means our alpha field will be 40 characters long. Tab to the property labelled Init:
- The Init property is where you will create values that are updated immediately when the task starts, or are recomputed during execution. In this case, we are going to initialize the field to Hello World. Press F5 to zoom to the Expression Rules.
- In the Expression Editor, press F4 to open up a line, and type ‘Hello world’ (including the single quotes). Click OK.
- The Expression Editor will close, and the number ‘1’ will appear next to the Init: prompt. This means that the Init: is pointing to expression #1. You will also see all or part of the expression to the right of the Init: field.
Hint: For a simple expression like this, you can also just type = in the Init column. This will open up a small box, and you can type the expression there.
And that is all you have to do for this program in the Data View editor.
Creating your logic
For this program, you don’t need to do anything in the Logic Editor. uniPaaS will take care of most of the housekeeping for most programs, so there is usually not as much explicit logic as you would expect.
What you would be creating here would be certain kinds of field validations, calling other programs. See How Do I Work with the uniPaaS Engine as an Event-Driven Engine? for more details about using logic and events in uniPaaS.
Creating your display
- Click on the Forms tab. You will already see a form created, named “Hello World!”. By default it will be named the same thing as your task, but you can rename it if you want. Also, by default, this is the text that will show on the title bar of the window.
- Zoom (F5 or double-click) on the Name of the field. Now you will see your display. It is basically an empty window at this point. You can reposition it, or drag the sides of the window to resize it. The properties pane (Alt+Enter) will also show you a lot of ways you can change this window. But for now, we’ll just accept the defaults.
- Besides your display, you should see two extra boxes, labelled Controls and Commands. These are palettes you will use while editing forms in uniPaaS. The same options are also available on the overhead menu and via shortcut keys. It is good to get familiar with the options and the shortcut keys.If for some reason the Controls and Commands are not showing in the workspace, select View->Form Editor Palettes (also available on an overhead icon). This toggles the palettes off and on.
- Click the Variables tab on the Control palette. This will show you all the variables we have in our data view, which in this case is just one.
- Click on the variable. The cursor will change to a box, indicating we are selecting an edit field. Click on the form to drop the variable on the form. Note that the field is pasted, and so is the field prompt, which by default is the name of the virtual. If you name your virtuals carefully, you can save time creating your form.
That’s all you need to do here. Select Options->Save and Close Object to jump back to the Program repository.
Running your program
- Before you run your program, press F8 (Options->Check Syntax). If the program is ok, you will get a message on the prompt line “Program is OK”. Otherwise error messages will appear in the Checker pane. You should always fix the errors before running the program, because as with any programming language, some errors will result in unexpected behavior.
- To run your program, select Debug->Run (F7). A new window will appear, running your program as it would appear in the uniPaaS runtime engine. While the program is running, your development environment is locked, in read-only mode.
- Here is your Hello world! program. When you exit out, you will be back in the uniPaaS Studio, and you can do more programming and re-test it. This way, you can easily do incremental programming in the Studio.
- There is also a full debugger available, so while you are running your program you can see what the uniPaaS engine is doing internally.
Whoever says that Notepad is a boring application is wrong! Today, we will tell you really cool Notepad tricks that you can play with the help of your long-time companion, the Windows Notepad. A simple text editor like Notepad may not be the favorite of programmers but the same programmers are giving you codes that will make for an amazing demonstration.
As you know, Notepad is a plain text editor that creates .txt files. Text typed in this tiny application is not formatted and can be easily exported to any other text editor. Although .txt is the default file extension of Notepad, it can also open files with several other extensions. One of the really good use of Notepad is to remove formatting (created by MS-Word or HTML Web pages) and get completely plain text. But there are a lot of other interesting things that you can do with this little magic! Let’s learn!
1. Notepad Code for Matrix Style Raining Code
Remember posters of The Matrix movie? Green colored letters falling from top to bottom on a black background. You can create a similar never-ending effect using a simple Notepad trick.
- Copy the code given below and paste it in a Notepad file
- Save the file as matrix.bat
- Double click the saved file and see the effect
The Code
@echo off
color 02
:start
echo %random% %random% %random% %random% %random% %random% %random% %random% %random% %random%
goto start
color 02
:start
echo %random% %random% %random% %random% %random% %random% %random% %random% %random% %random%
goto start
How it works?
When you save a file with .bat extension, it becomes an executable file. When you open such a file, your computer runs the program code saved in the file. The above give code creates randomly generated numbers and paint them green colored. This program will keep on generating random numbers until you close the command prompt window.
TIP 1: You can change the color of falling text by changing color 02 to, for example, color 03. Try using different values and see which colors your like!
Notepad Code to create matrix like letter waterfall.
TIP 2: A more accurate Matrix Raining Code effect can be created with the following code. Try it out. It’s been taken from WikiHow:
@echo off
:a
color 2
echo 1 1 1 0 1 0 0 0 1 1 1 1 0 0 0 1 1 0 0 1 0 0 0 1 1 0 1 0 1 0 0 0 1 1 1 1
ping localhost -n 1 > nul
echo 1 1 0 1 1 1 0 0 0 1 0 1 a f h 0 0 0 1 0 1 1 0 0 1 1 1 0 0 1 0 1 0 0 1 1 0
echo 1 0 0 1 1 0 9 8 1 2 0 1 9 9 2 1 1 1 0 0 1 0 1 1 1 0 1 1 0 1 0 0 0 1 0 1 1
ping localhost -n 1 > nul
echo 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 1 0 0 1 0 1 0 1 1 0 1 0 0 0 01 0 1 0 0 1 0
ping localhost -n 1 > nul
echo 1 0 1 1 1 0 1 1 0 9 1 1 2 1 1 0 9 1 0 5 7 7 8 7 8 1 3 2 1 2 1 2 3 2 1 3 4
ping localhost -n 1 > nul
echo 1 1 1 0 1 0 0 1 0 0 0 1 1 1 0 0 1 1 1 4 1 2 1 1 2 0 1 0 1 2 2 1 0 1 1 0 1
goto a
:a
color 2
echo 1 1 1 0 1 0 0 0 1 1 1 1 0 0 0 1 1 0 0 1 0 0 0 1 1 0 1 0 1 0 0 0 1 1 1 1
ping localhost -n 1 > nul
echo 1 1 0 1 1 1 0 0 0 1 0 1 a f h 0 0 0 1 0 1 1 0 0 1 1 1 0 0 1 0 1 0 0 1 1 0
echo 1 0 0 1 1 0 9 8 1 2 0 1 9 9 2 1 1 1 0 0 1 0 1 1 1 0 1 1 0 1 0 0 0 1 0 1 1
ping localhost -n 1 > nul
echo 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 1 0 0 1 0 1 0 1 1 0 1 0 0 0 01 0 1 0 0 1 0
ping localhost -n 1 > nul
echo 1 0 1 1 1 0 1 1 0 9 1 1 2 1 1 0 9 1 0 5 7 7 8 7 8 1 3 2 1 2 1 2 3 2 1 3 4
ping localhost -n 1 > nul
echo 1 1 1 0 1 0 0 1 0 0 0 1 1 1 0 0 1 1 1 4 1 2 1 1 2 0 1 0 1 2 2 1 0 1 1 0 1
goto a
2. Shutdown Computer with a Message using Notepad Code
What if you could easily shut down your computer and also get it to say good night to you! You can set it up very easily. Copy the following code in Notepad and save the file as shutdown.bat (in fact you can use any name, just keep the .bat extension)
@echo off
msg * Computer will now shut down
shutdown -c “Good night. Sleep well!” -s
msg * Computer will now shut down
shutdown -c “Good night. Sleep well!” -s
When you will open this file; your computer will prompt you that it will shutdown now. If you say OK, it will.
How To Use Notepad++ For HTML
3. Create a Log (Diary) using Notepad
If you have the habit of regularly taking notes in a Notepad file, this feature will be of great use to you. This feature of Notepad will automatically add date and time when you’ll close the file.
How To Code A Website Using Notepad
- Create a new Notepad file
- Type .LOG in the first line and then save the file as log.txt
- Now, open the file again and you will see that there would be an extra line at the end. This line will tell you the time when you last closed this Notepad file.
- Write something and again close the file. Notepad will add another timestamp.
4. Text to Speech using Notepad
A small piece of Notepad code can allows you to create an application that will read out aloud whatever text you will give it as input. This feature really comes handy if you quickly want to convert a piece of text into spoken words.
- Open Notepad and copy-paste the following code in it
Dim message, sapi
message=InputBox(“What do you want me to say?”,”Speak”)
Set sapi=CreateObject(“sapi.spvoice”)
sapi.Speak message - Save the file as speak.vbs
- Double click on the saved file. A popup box will appear. Enter the text in this box and click the OK button.
- You will hear computer reading out your text. Make sure your speakers are on and speaker volume is enough!
Notepad code for text to speech application.
5. Automatically Eject CD Drive
The following Notepad code can automatically eject CD drive of your computer and keep on doing it repeatedly. You can use this script to bother your friends a little bit if that sounds like fun. Add the following code in Notepad and save the file as opencd.vbs. Double click the saved file and see what happens.
Set oWMP = CreateObject(“WMPlayer.OCX.7”)
Set colCDROMs = oWMP.cdromCollection
do
if colCDROMs.Count >= 1 then
For i = 0 to colCDROMs.Count – 1
colCDROMs.Item(i).Eject
Next
For i = 0 to colCDROMs.Count – 1
colCDROMs.Item(i).Eject
Next
End If
wscript.sleep 5000
loop
Set colCDROMs = oWMP.cdromCollection
do
if colCDROMs.Count >= 1 then
For i = 0 to colCDROMs.Count – 1
colCDROMs.Item(i).Eject
Next
For i = 0 to colCDROMs.Count – 1
colCDROMs.Item(i).Eject
Next
End If
wscript.sleep 5000
loop
Warning: Please note that this script will loop on and may cause the computer to hang.
6. Open Notepad Repeatedly
Add the following code in a new Notepad file and save it with .vbs extension. This code will keep on opening Notepad instances. As a result, your computer screen will be full of just Notepad windows.
@ECHO off
:top
START %SystemRoot%system32notepad.exe
GOTO top
:top
START %SystemRoot%system32notepad.exe
GOTO top
Warning: This is another trick that may make your computer to hang. Computer may become too busy in opening more and more Notepad windows that it will hardly get any time to do anything else. So, try it with care!
7. Make Lock LEDs on Keyboard Dance
Every standard PC keyboard has three lock keys, namely Caps-lock, Num-lock and Scroll-lock. Each of these keys has an LED light on keyboard that shows the status of that lock. The following code can make these LED lights blink in a fashion so as to make them appear as dancing lights.
Open Notepad and add the following code in it. Save the file as led.vbs and when you will open this file, the LED light will begin to dance!
Set wshShell =wscript.CreateObject(“WScript.Shell”)
do
wscript.sleep 100
wshshell.sendkeys “{CAPSLOCK}”
wshshell.sendkeys “{NUMLOCK}”
wshshell.sendkeys “{SCROLLLOCK}”
loop
do
wscript.sleep 100
wshshell.sendkeys “{CAPSLOCK}”
wshshell.sendkeys “{NUMLOCK}”
wshshell.sendkeys “{SCROLLLOCK}”
loop
Warning: This trick may make your computer too busy to respond.
8. Bush Hid the Facts
Some of the older versions of Notepad have an interesting bug in it. Write four words of 4,3,3 and 5 letters and then save the file. When you will open this file again, instead of what you had written, you will see gibberish text. Following are some of the examples of such 4-3-3-5 sentences:
- Bush hid the facts
- Bill fed the goats
- This app can break
This happens because of a bug in Windows. However, in newer versions of Windows, this bug has been taken care of. You can give it a try to see what your computer shows!
9. World Trade Center Attack
This Notepad trick is basically a hoax. Nevertheless it produces interesting result.
- Open Notepad and type Q33N in it
- Go to Format > Font
- Change the Notepad font to Wingdings
- Set the font size to 72
When you do this, you get to see something that will remind you of the terrorist attack on twin World Trade Tower.
How To Create Software
Wingdings is a font that has pictorial symbols instead of alphabetical letters.
10. Make Password Protected Folder using Notepad
This is probably the most useful Notepad code on the list. This trick creates a password protected private folder in your computer. Whatever you will place inside this folder will remain private until the opener provides a password.
Bypass macbook password. Open Notepad and copy the following code in it:
Create A Webpage Using Notepad
@ECHO OFF
title Folder Private
if EXIST “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}” goto UNLOCK
if NOT EXIST Private goto MDLOCKER
:CONFIRM
echo Are you sure you want to lock the folder(Y/N)
set/p “cho=>”
if %cho%Y goto LOCK
if %cho%y goto LOCK
if %cho%n goto END
if %cho%N goto END
echo Invalid choice.
goto CONFIRM
:LOCK
ren Private “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}”
attrib +h +s “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}”
echo Folder locked
goto End
:UNLOCK
echo Enter password to unlock folder
set/p “pass=>”
if NOT %pass% techwelkin goto FAIL
attrib -h -s “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}”
ren “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}” Private
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDLOCKER
md Private
echo Private created successfully
goto End
:End
title Folder Private
if EXIST “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}” goto UNLOCK
if NOT EXIST Private goto MDLOCKER
:CONFIRM
echo Are you sure you want to lock the folder(Y/N)
set/p “cho=>”
if %cho%Y goto LOCK
if %cho%y goto LOCK
if %cho%n goto END
if %cho%N goto END
echo Invalid choice.
goto CONFIRM
:LOCK
ren Private “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}”
attrib +h +s “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}”
echo Folder locked
goto End
:UNLOCK
echo Enter password to unlock folder
set/p “pass=>”
if NOT %pass% techwelkin goto FAIL
attrib -h -s “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}”
ren “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}” Private
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDLOCKER
md Private
echo Private created successfully
goto End
:End
Save the file as private.bat and close Notepad.
Double click on private.bat file to open it. This will create a new folder called Private.
How Do I Create A Computer Program?
Place anything in it that you want to keep password-protected.
Close the password-protected folder. The next time you will open it, it will ask for a password. The password in the above code is techwelkin. We have highlighted the password in the above code. You can change it to anything you want in the the Notepad file. You should keep a strong password for added security (you can use our strong password generator).
See More Results
These were some of the coolest Notepad codes and tricks. We will add more Notepad tricks in this list as and when we will discover them. We hope that this article was useful for you. Thank you for using TechWelkin!