April 2006 Archives
Ok, here's one for the masses.
This post describes how to add info about the song currently playing in iTunes to emails you compose in Outlook. Anyone can do it!
First, create the macro. To do so:
- Open Outlook.
- From the Tools menu, select Macro, then Macros...
- In the Macro field, enter a name for your macro. "AddiTunesSig" is probably appropriate. [screenshot]
- Click "Create".
- A "code window" will open. This is where, in a minute, you will type the code that makes up the macro.
- But first, you need to tell Outlook how to talk to iTunes. To do so, go to the Tools menu and select References. Scroll down until you find "iTunes Type Library" or something similar. Select its checkbox and click OK. [screenshot]
- Back in the code window, you will see two lines of code:
Sub AddiTunesSig()andEnd Sub. In between these lines, paste in the following code:' purpose: opens a new mail message, ' appends info re: currently playing track in iTunes Dim itunes As iTunesApp Dim strArtist As String Dim strTitle As String Dim strOutput As String Dim mail As Outlook.MailItem Set itunes = New iTunesApp 'load the track info into easy-to-read variables strArtist = itunes.CurrentTrack.Artist strTitle = itunes.CurrentTrack.Name strAlbum = itunes.CurrentTrack.Album 'assemble the signature strOutput = vbNewLine & "------------------------------" strOutput = strOutput & vbNewLine & "Now playing: " & vbCrLf _ & strTitle & vbCrLf & strArtist & vbCrLf & strAlbum 'create a new email message Set mail = Outlook.CreateItem(olMailItem) 'put the signature in the body mail.Body = vbNewLine & vbNewLine & strOutput 'show the message to the user mail.Display 'clear up the memory Set itunes = NothingSee how easy programming is! [screenshot]
- To finish up: Click the Save button on the toolbar and close the code window.
Now, you need to add a toolbar button to your Outlook toolbar that will run this macro. To do so:
- Go to the Tools menu, and select Customize...
- In the dialog box that pops up, scroll down the left side, and click Macros. [screenshot]
- You will see your macro on the right ("Project1.AddiTunesSig"). Drag it up to a convenient location on your toolbar. (Next to the "New" button is probably a good place.)
- To rename the button, right-click the button and type the new name where it says "Name:" in the pop-up menu. "New (with music)" is probably a good name. [screenshot]
- Close the Customize window.
That's it! To use it, open iTunes, play a song, go back to Outlook, and click your new button. A new email will open with info about the currently playing song in the signature area.
Earlier: How to control iTunes from any Microsoft Office application.
Let's say Sprint happened to to send you a free phone with a free service plan as part of their Ambassador program. Wouldn't you want to share the benefit of that service with as many people as possible? Especially if the plan included free data service? After all, Mr. Ambassador, you certainly want everyone to enjoy Sprint's quality service as much as you do, right?
Or let's say you're so rich you can afford to pay Sprint's (probably high) fees for unlimited data service. Since there's no additional cost to you, shouldn't you share some of that bandwidth with some of us poor saps who can't afford such luxuries?
This post describes how to use your Bluetooth- and Airport-enabled Mac with your Bluetooth-enabled Sprint PCS phone to set up a mobile wifi access point. Meaning, you can put your iBook in your car or backpack, put your phone in your pocket, and give free wifi internet access to anyone who happens to be in the area. (Of course, you will also be able to access the internet yourself all the while.)
These instructions assume you are using Mac OS X 10.4 (Tiger), and a Samsung A920, the official phone of Sprint Ambassadors everywhere. But they should apply to any Sprint phone with Bluetooth that is capable of being a data modem and/or using their Power Vision service. Non-ambassadors will have to navigate the labyrinth of Sprint customer service and get "phone-as-modem" service added to their plan. Once you've gotten that taken care of, please continue...
Summary for experienced people
Details are below, but if you know what you're doing and just want to do it quickly:
- Turn on Bluetooth on your phone.
- Pair your phone with your Mac.
- In the PPP configuration for Bluetooth in Network preferences, leave the username and password blank and use this phone number:
#777 - In Sharing preferences, go to the Internet pane and turn on Internet Connection Sharing for Bluetooth, allowing AirPort devices to connect.
- Back in PPP, click "Dial Now...". You should be all set. By default, your SSID will be your computer's name.
- If you need a detailed step-by-step, continue reading...
First, set up the phone
- Press "Menu/OK".
- Select "Settings".
- Scroll down and select "Bluetooth" and press OK.
- If Bluetooth is disabled, click OK on to enable it.
- Set "Visibility" to "Always visible". (This is optional and not very secure, but it might make things easier later.)
- Select "Device Name" and enter a nice name for your phone. This is the name other Bluetooth devices (like your Mac) will display when connecting to your phone. (I have found in other contexts that choosing a one-word name can reduce errors.)
Connect your Mac to your phone via Bluetooth
- Open System Preferences.
- In the Hardware section, click Bluetooth.
- In the Settings pane, make sure it says Bluetooth is on. Other than that, it doesn't matter much what is selected. [screenshot]
- In the Devices pane [screenshot], click "Setup New Device".
- The Bluetooth Setup Assistant wizard will start. Click "Continue" and select "Mobile phone" from the list of device types.
- The wizard will scan the airwaves looking for Bluetooth devices. When you see the name of your phone, select it and click "Continue".
- After a few seconds of "gathering information," the wizard will prompt you to click "Continue" to continue. Do so.
- Your computer will display a "passkey", a number you have to type into your phone to "pair" the phone with your Mac. [screenshot]
- Your phone will prompt you to accept the pair. Press "Accept".
- Enter the passkey into your phone and press OK. If you wait too long, the connection will time out, and you'll probably have to go back in the wizard and get a new passkey.
- Once the pairing has taken place, click "Continue" to continue.
- Make sure "Access the internet with your phone's data connection" is checked.
- Click "Continue".
- Here's the important part: You will be prompted to enter connection settings. Leave "Username" and "Password" blank. In "Phone Number", enter
#777. For "Modem Script", select "Sprint PCS Vision". [screenshot] - Optionally, select the checkboxes to show Bluetooth and Modem status in the menu bar.
- Click "Continue".
- Click "Quit".
Connect to the Internet
At this point, you might want to turn off Airport and/or unplug your network cable, so that when you connect to the internet via the phone, you'll be sure you are connected via the phone. (After it's all set up, you can turn Airport back on.) In the meantime, here's how to get connected:
- Open System Preferences. (Or click "Show All" if your Bluetooth panel is still active.)
- In the Network & Internet section, choose "Network".
- In the dropdown labeled "Show", select "Bluetooth".
- In the "PPP" pane, make sure "Account Name" and "Password" are blank, and that "Telephone Number" is
#777. - In the "Bluetooth Modem" pane, make sure the Modem dropdown says "Sprint PCS Vision", and (optionally) check all checkboxes. Now you're ready to connect to the internet.
- Go back to the "PPP" pane, and click "Dial Now..." An "Internet Connect" dialog box will appear. Make sure the Bluetooth pane is showing. [screenshot]
- Click "Connect". The modem status in the menu bar will read "Connecting..." and your phone will say "Connected as data modem to [your computer name]". You are connected! A timer on the phone will show the duration of your connection.
- Open a web browser on your computer to confirm that you are connected.
Share your internet connection via AirPort
Now you are ready to share your connection to the internet with other users. To do so:
- Turn AirPort back on if you turned it off earlier.
- Return to System Preferences. (Click "Show All" if you are still on your Network settings.)
- In "Internet & Network", click "Sharing".
- Go to "Internet" pane. [screenshot]
- In the dropdown labeled "Share your connection from", select "Bluetooth".
- In the "To computers using" area, select "AirPort".
- Click "AirPort options" to make sure encryption is not turned on and/or to change the name of the access point (SSID) that your Mac will broadcast .
- Click "Start" to start sharing your internet connection via wifi.
- You may get a message saying this conflicts with your firewall setting, as Personal Web Sharing must be turned on (for some reason) to share your internet connection. If there's a dialog, click "Show Services" or directly open the "Services" pane in Sharing (which partially controls your firewall), and activate "Personal Web Sharing" service. Note that this will make the "Sites" folder in your home directory available via your network connection. (If someone can explain to me why Personal Web Sharing has to be turned on in order to share your internet connection, I'd love to hear it. If it's just to open the port, couldn't they do that without firing up your web server?)
- That's it! You're connected and you're sharing your connection. You might want to test it with another wifi device to make sure it can connect. (By default, your Mac will broadcast its name as the the name of the access point (SSID)).
Potentially sad note: Some devices may not be able to obtain an IP address from your Mac, in which case they won't be able to use your connection to the internet. However, if you can talk to whoever is attempting to share your connection (e.g., you're over at your friends' house and want to get them online), you can configure their network connection manually. To do so, follow these instructions. I'd recommend keeping the IP addresses of some public DNS servers handy, so you can just type those in instead of trying to determine them from the dig utility or similar. I really don't know anything about Internet Connection Sharing on the Mac, so I have no idea which devices can automatically obtain an IP from it and which can't.
Added bonus: Note that if you look at the Personal Web Sharing preferences, you'll see your external IP has been resolved to an actual domain name like http://h460c83c6.area2.spcsdns.net. Anyone accessing that address in their browser will see whatever website your Mac is serving from its web server folders.
Keep in mind:
- Sprint PCS may or may not like the idea of you sharing your bandwidth. (Especially if you're not an Ambassador and don't have diplomatic immunity.)
- If you are at work or school, your network administrator may or may not like (1) your computer's new-found role as a DHCP server, and (2) your computer giving indirect access to his/her LAN.
Even so, at least you can go to bed knowing you are the Robin Hood of wireless bandwidth!
Someone else has probably posted these before, but it's new to me, so I'm posting them. In this Flickr set, you can see various image files I took from Tivo's /tvbin directory. Each image is an error message or some kind of prompt. I got these by putting my Tivo's hard drive in a USB enclosure and mounting it on my Mac, using the handy ExtFS Manager, which lets you mount ext2 and ext3 formatted drives on your Mac.

