This script sends MapQuest directions to a BlueTooth-enabled Nokia phone. This script has been tested with a Nokia 3620 model. Copy the following script into a text editor, and save as mapquest.pl.
#!/usr/bin/perl
print "Enter filename for parsing:";
my $filename = <STDIN>;
my $outfile = "writeout";
open MYHANDLE, "<$filename";
open WRITEFILE, ">$outfile";
$i =1;
while(<MYHANDLE>)
{
chomp($name = $_);
print WRITEFILE "$name";
if($i %5==0)
{
print WRITEFILE "\n";
}
$i++;
}
close MYHANDLE;
close WRITEFILE;
system "cp $outfile $filename";
system "open -a /Applications/Utilities/Bluetooth\\ File\\ Exchange.app/ $filename";
exit(0);
In the Terminal, type the following to make the script executeable:
chmod 755 mapquest.pl
Now go to MapQuest's directions page and enter driving directions.
Click on the Print link. Highlight only the directions (start highlighting at number 1 until you get to the last step in the directions) -- do not highlight map! Copy and paste into a text editor, and then save it to your hard drive.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20040804182812579