A self-taught computer wizard is attracting the attention of police from around the nation and Scotland Yard for a computer dialing program that checks on elderly people who live alone.

"Good morning!" the recorded message announces. "Are you O.K.?"If the recipient of the call utters a response, the computer assumes the answer is yes and moves on to the next person. If there's no answer or the telephone is busy, the computer repeats the call.

But if there's no answer a second or third time, the computer designed by Bruce Johnson sounds an alert to law enforcement officials who dispatch a squad car to see if anyone is in danger.

"It's a good deal all the way through," said Clyde Ritter, 73, of rural Osage, Iowa. "They say it saved my life."

Ritter had gone into a diabetic coma one morning in August at his home five miles northwest of Osage.

The town's "Are You O.K.?" computer at police headquarters alerted authorities that Ritter failed to answer a second call, and a deputy sheriff was sent to the home. He found Ritter comatose and summoned an ambulance.

"I guess I credit the system for saving at least one life," said Osage Police Officer Michael DeKruif. "We've had tremendous success with it."

Besides Ritter's rescue, the system has alerted Osage police to an elderly man whose hands were caught in a window - trapping him inside his own home - and to three elderly people who had fallen in their homes and needed police to help them.

"I haven't seen anything like it," said Retha Jefferson, a police department desk officer in Belhaven, N.C. "It's just that officers respond to calls all the time of neighbors not seeing their neighbors for two or three days and then it's too late."

Jefferson, who manually calls about 45 elderly people each day to check on them, said Belhaven is raising $7,000 to buy a system.

The 41-year-old Johnson said he developed the program about a year ago for Osage "more or less as a public service" while he was living in nearby Austin, Minn. Johnson had video stores in Austin and Osage and was considered a computer guru by friends.

Members of the police department had heard of a computer dialing system in Carthage, Mo., and they wanted Johnson to improve on it.

"I foolishly told the city, `I'll write it for you,"' Johnson said. "It took me 14 months."

Thanks to publicity in law enforcement journals, the project has blossomed into a full-time business for Johnson, a former Army and National Guard officer.

Only Osage, Charles City, Iowa, and Sutherlin, Ore., are on line with the system, but inquiries and purchase orders have been pouring in from all over.