How To Display A Message

Table of contents:

How To Display A Message
How To Display A Message

Video: How To Display A Message

Video: How To Display A Message
Video: 2 Ways To Display A Message After Submitting HTML Form 2024, May
Anonim

Displaying messages on the screen is used to interact with the user in various applications, as well as in mobile devices such as cell phones, tablets or regular watches. To display your own message on the computer screen, you do not need to install additional programs or learn programming. This task can be easily accomplished using the tools built into the Windows operating system.

How to display a message
How to display a message

Necessary

Operating system Windows XP or newer

Instructions

Step 1

To display a message on the screen, in the Windows operating system, it is enough to write a small script in the Visual Basic language. Create a text file script.txt. The name and location of the file do not matter. Open the file in any text editor. Enter the string: "MsgBox" message text " (without the "Christmas tree" quotes, but with the "strokes" quotes). Save the file and close your text editor. Change the file extension to *.vbs. The icon should change. Now the operating system perceives this file not as a text file, but as a set of commands that are executed by the built-in Windows interpreter Visual Basic. This component is present in all operating systems of this family, starting from XP, which allows you to run the script on any computer. When run, this script will display a message in a window. The quoted text can be anything.

Step 2

An alternative to VBS script is writing Java Script. The Java language is more complex, but a script written in it can be run not only on Windows operating systems, but also on many others. Create a text file, open it in an editor and enter the line "WScript. Echo (" message text ");". You do not need to enter external quotes, but if you do not enter internal quotes (those in which the text is enclosed), the script will not work. Change the file extension to *.js. Run the file for execution. As a result, a window will be displayed, exactly the same as when writing a program in Visual Basic.

Step 3

There is another way to display messages - using the net send command. The advantage and distinctive feature of this method is that the message can be sent to any computer on the local network. On the keyboard, press the win + r keys at the same time, in the window that opens, enter the line cmd and press Enter. A command entry window will open. In it write "net send computer name message" (without quotes) and press Enter. The specified computer will display the message in much the same way as if it had been generated using a script on the local machine. Please note that it will contain a return address. Instead of the name of the recipient computer, the IP address can be specified.

Recommended: