A Simple Messaging System

By Tom Lyon

Tom is a system administrator for NetOne Communications in Sears, Michigan. Here he shows us how he sends messages across his office network.  You can reach Tom at tlyon@netonecom.net

Seeking to improve inter-office communications, I've developed a method to automatically notify, via popup form, any or all machines on a local network running Alpha5 on a server.

The basic theory utilizes a single form which will be open on all machines for the duration of each Alpha5 session. This form's OnTimer event is the key to notification. It reads and responds to the presence of a flag that, when set, causes the notification to occur.

Here is an example of the message form, popped up on a workstation:

figure1

Figure 1. Workstation showing messages.

New messages are entered in another form that contains a "Page" button to send the message to a designated workstation:

figure2

Figure 2. New messages are entered on a one-line form.

From here on, a machine will be referred to as a 'station'. I've numbered stations acc ording to the telephone extention at each one, from 100 to 108, in my case. Station IDs are required for indicating source and destination of each notification, from here on to be referred to as a 'page'.

Upon starting Alpha5 on each station, a local disk file which indicates the unique station ID is read and the value placed in a global character variable named 'station'.

To flag a page for a particular station, the following XBasic code is executed from a form button:

popupto = ui_get_radio("Select Station Number", 1, "100", "101",\
"102","103","104","105","106","107","108", "ALL")
if popupto = "ALL" 
   popupfile =
file.create("//alpha5/c/a5/popupchat100.txt",FILE_RW_SHARED)
   popupfile.close()
   file.copy("//alpha5/c/a5/popupchat100.txt",\
"//alpha5/c/a5/popupchat101.txt")
   .
   .
   .
   file.copy("//alpha5/c/a5/popupchat100.txt",\
"//alpha5/c/a5/popupchat108.txt")
else
   popupfile = file.create("//alpha5/c/a5/popupchat" + popupto \
+ ".txt",FILE_RW_SHARED)
   popupfile.close()
end if
end

The OnTimer event that reads this flag:

if file.exists("//alpha5/c/a5/popup" + station.value + ".txt") then
   file.remove("//alpha5/c/a5/popup" + station.value + ".txt")
	if is_object("chat") then
		:a5.restore()
		chat.restore()
		chat.show()
		chat.activate()
		sys_focus_put()
	else
		:a5.restore()
		:Form.view("chat")
		chat.activate()
		sys_focus_put()
	end if
end if

The code could be cleaned up and compacted by someone more adept at XBasic.

The form I use to pop up on the station is an interactive text form where station operators can communicate back and forth in real time. If you would like to see this form, I will be happy to provide it. This form contains the paging button and when pushed, causes the same form on another station to receive focus, thus bringing the station operator's attention to the popup form. There are many variations possible along with customized messages to pop up, such as email notification, etc. It is a way to alert every station operator to the need for say, a meeting, or the need to perform maintenance on the system which might require exclusive access by the system operator.

 Click here to download a sample Alpha Five database illustrating Tom's message system.

7/7/00

Don't forget, we need your feedback to make this site better!

Return to home