#!/usr/bin/perl -w # # Copyright 2000 by Michael Coyle # Released under GPL. # # Call it with: # [an error occurred while processing this directive] # # Get the file name from the browser... $file_name = $ENV{'QUERY_STRING'}; # Open the file... open (EP, $file_name); # Print to the browser... print "Content-Type: text/html \n\n"; # Load the file and keep spitting it out to the browser... while () { chomp; print "$_ "; } # Close the file and go home... close EP #!/usr/bin/perl -w # # Copyright 2000 by Michael Coyle # Released under GPL. # # Call it with: # [an error occurred while processing this directive] # # Get the file name from the browser... $file_name = $ENV{'QUERY_STRING'}; # Open the file... open (EP, $file_name); # Print to the browser... print "Content-Type: text/html \n\n"; # Load the file and keep spitting it out to the browser... while () { chomp; print "$_ "; } # Close the file and go home... close EP

3D
3D Photo Gallery (Part 1)
3D Photo Gallery (Part 2)

Audio
Poor Man's MIDI
Make A Metronome
iPod Tricks (Part 1)
iPod Tricks (Part 2)
iPod Tricks (Part 3)
Laugh Track Machine
Audio Player with Reverb
Shepard Melody
RB Phone Home
Build a Drum Machine

Custom Controls and Windows
Double Click Listbox
Draggable Metal Window
Double Click Canvas
Custom Buttons
Custom Buttons Part II
iTunes-style Listboxes
Custom Controls


General RB
Scrolling Windows
Using Mesage Dialogs
Case-Sensitive Word Finder
Introduction to Stacks
Wiggle Window
JPEG in PDF
Listbox Checkboxes
Background Applications
Listbox Auto-Find
Virtual Volumes
Time Tracker
Software Distribution (Part 1)
Software Distribution (Part 2)
Software Distribution (Part 3)
Software Distribution (Part 4)
Exceptions
Tips and Tricks
Text Clippings Made Easy

Graphics
Drawing a Simple Gradient
The SpriteSurface: Space Game
Image Spinner
Cropping Graphics (Part 1)
Cropping Graphics (Part 2)
Cropping Graphics (Part 3)
Cropping Graphics (Part 4)
Shimmer Graphics
Lissajous Figures
Simple Screen Capture
Vector Graphics
Kaleidoscope Images
Stegonography
Spirals!
Image Table
RB Magnifying Lens
Screen Capture
Color Picker Tutorial

Hacks
Ghost Grab
Speedy Mouse Extension
iTunes Plugins
iTunes Skinner

Mac OS X
Global Hot Key Event (Carbon Events)
Login Welcomer (Carbon Events)
Add/Remove Buttons
Resizable Sheets
Mac OS X Preferences Window
Using Sheets in REALbasic
Build a Bundle (Part 1)
Build a Bundle (Part 2)
Dock Your Passwords
Mac OS X Debugging
REALbasic Mac OS X Icon Tutorial
Animate Your Dock
RB and the Command Line

Menus
Window Menu
Templates Menu
Listbox Menu

Novelty
Guessing Game
Calendar Trivia
Tile Mixer
Zip Code Finder
Happy Valentine's Day
Merlin Simulator (Part 1)
Merlin Simulator (Part 2)
Merlin Simulator (Part 3)
Buzzword Machine
AppleSoft BASIC

Printing
Print to PDF

Registration
Registration Code Validation
Network Registration Codes

Resources
Picture Extractor (Part 1)
Picture Extractor (Part 2)

Serial
Caller ID (Part 1)
Caller ID (Part 2)
Caller ID (Part 3)

Speech
Speech Recognition

Socket Communication
Easy Peer-to-Peer File Sharing
MacPAD Version Checking
Display Web Image In Canvas
HTML IMG Tags
Version Tracking
Even Smarter Instant Messaging
Web Tiler
JavaScript and REALbasic
Stock Ticker (Part I)
Stock Ticker (Part 2)
AIM Mate

XML Manipulation
Simple XML Introduction

Video
Big Brother Video Capture

Note: All articles without a byline were written by Erick Tejkowski. When cleaning the site I removed them because the code differed from page to page, and I have yet to put them back in.

resexc2.gif (20k)




REALbasic for Dummies
by Erick Tejkowski

$19.99 @ Amazon





Files are in Stuffit 6.5 or earlier, or ZIP format.
Download Stuffit Expander

Tell us about a bad link.

Build a Caller ID Application Part I
06-28-01




If you are anything like me, you have probably encountered an annoying telemarketer just as you sit down for a meal. Caller ID has helped to reduce this menace. With an inexpensive box, you can instantly discover the identity and phone number of the offending caller. But, did you know that your Mac can read and understand caller ID information too?

This week's tutorial is the first in a three part series which will show you how to build a simple caller ID (CID) application with REALbasic.

Now, before you ask why someone would want to replace a twenty dollar caller ID box with a thousand dollar computer, keep in mind that your Mac is capable of doing much more than a caller ID box. For example, your Mac can:

  • Log all incoming calls for days, months, or even years at a time.
  • Speak the phone number when the call arrives.
  • Email you a notice each time someone calls.
  • And more!

Sure, there are several caller ID applications on the market, but what fun would that be? Armed with this tutorial, a copy of REALbasic, an old modem, and an even older Mac, you can read the caller ID information yourself and do with it whatever you wish.

Tutorial Schedule

Since this tutorial is somewhat technical in nature and requires both hardware and software knowledge, we will split it up over three articles. The weekly schedule for the tutorial:

  1. Project Preparation - This week's tutorial
  2. Building the Resex caller ID software
    • How to use the REALbasic Serial control.
    • Understanding the CID spec.
    • Using caller ID data in a REALbasic application.
  3. Advanced Features
    • Useful applications for the Resex caller ID
    • Extend the Resex caller ID
    • And more!...

What You'll Need

To complete this project, you will need the following:

  1. A copy of REALbasic
  2. A Mac
  3. A caller ID compatible modem
  4. Modem documentation

A copy of REALbasic. If you are reading this tutorial, you are probably already a REALbasic user, but if you aren't, download a copy from REAL Software.

A Mac. This part of the project is wide open. You can use one of many different kinds of Macs for this project. This project lends itself nicely to old machines. Caller ID data doesn't require much processing power at all and old Macs have the necessary serial inputs for interfacing with a modem. In fact, even a 68K machine would be right at home for this application. Now would be a good time to go dig that old Performa or Quadra out of your closet and give it a new life. For example, I will be using a 6360 and a 5260 as test machines for this tutorial.

A caller ID compatible modem. This may be the trickiest part of preparing for the tutorial. You will need a modem that is capable of receiving caller ID data. Not all modems have this feature, but many do. The bad news? iMac modems and most modems in New World Macs do not sport this feature. The good news? Many old (and slow) modems do have this feature. The speed of the modem does not make any difference here, since the amount of data being transferred is minimal and the caller ID specification provides for data tranfer speeds that are many times slower than even 14.4 modems. Check your modem's documentation to learn about its caller ID abilities (or lack thereof). For example, I will be using a USRobotics 33.6 Sportster modem as the test modem for this project.

Modem documentation. Although not absolutely necessary, it is often helpful to have your modem's documentation on hand. There are standard commands for communicating with modems, but you may find subtle differences in the implementation of these standards. The documentation for your modem will clear up any discrepancies. If you managed to toss your documentation in the trash, look around on the web. Many companies post the documentation for their equipment in electronic formats (usually pdf).

Now what?

Once you have collected the necessary hardware and software for this project, take a glance at some of the caller ID information available on the web.

Caller ID FAQ
Beating Caller ID

Don't worry if some of this information doesn't make sense just yet. We will talk about it in more detail next week. This information is really just to get your feet wet. See you next week!






Please support ResExcellence by Visiting our Sponsors. One click makes a difference.


Download REALbasic and create your own software!

#!/usr/bin/perl -w # # Copyright 2000 by Michael Coyle # Released under GPL. # # Call it with: # [an error occurred while processing this directive] # # Get the file name from the browser... $file_name = $ENV{'QUERY_STRING'}; # Open the file... open (EP, $file_name); # Print to the browser... print "Content-Type: text/html \n\n"; # Load the file and keep spitting it out to the browser... while () { chomp; print "$_ "; } # Close the file and go home... close EP #!/usr/bin/perl -w # # Copyright 2000 by Michael Coyle # Released under GPL. # # Call it with: # [an error occurred while processing this directive] # # Get the file name from the browser... $file_name = $ENV{'QUERY_STRING'}; # Open the file... open (EP, $file_name); # Print to the browser... print "Content-Type: text/html \n\n"; # Load the file and keep spitting it out to the browser... while () { chomp; print "$_ "; } # Close the file and go home... close EP