|
|
|
|
Home > Learn > Using Location Manager with OE5/Entourage
A tutorial on using Microsoft Outlook Express 5 Mac Edition's Location Manager integration features.
Note: It is recommended that you read the sections of this tutorial in order.
This tutorial was written by Matt Gemmell. All comments are appreciated! |
Information |
What is the purpose of this tutorial? In a nutshell, to show you how to fully use the Location Manager integration features in Microsoft Outlook Express 5 - Macintosh Edition (just "OE5" from now on).
What is Location Manager? Location Manager is an Apple technology, which is included with all recent versions of the Mac OS. Location Manager allows you to define multiple "locations", which correspond to groups of settings for your computer. For example, when you're at work you probably have a different networking setup and a different email address and default printer. Using Location Manager, you'd simply define a location for Home and another for Work. When you went to either home or work, you'd just switch locations using Location Manager, and all the other settings would be changed automatically. You don't need to physically change your location in order to use Location Manager. For example, I have two different dialup internet accounts, and I have a location for each of them. I also have a location which activates ethernet networking, so I can copy files between my PowerBook and my desktop Mac. This tutorial does not teach you how to use Location Manager itself. Location Manager is actually pretty straightforward to use, and you can find out more about it by consulting the Mac OS Help, and the documentation which accompanied your latest version of the Mac OS.
What are the requirements for using Location Manager with OE5? Well, not surprisingly, you need to have both Location Manager and OE5 installed. :-) Location Manager is included with the Mac OS (if it's not installed, you can find it in the Mac OS installer on your Mac OS CD; choose Custom Install and find it in the scrolling list). OE5 is available for free download from Microsoft; you can get it here. In order to make full use of this tutorial, and of OE5 in general, you'll also need to have AppleScript installed. AppleScript is also included with the Mac OS, and is installed by default. So, in summary, you'll need: " Location Manager (from your Mac OS CD) " AppleScript (from your Mac OS CD) " Microsoft Outlook Express 5 (free download from here) This tutorial also assumes that you actually need Location Manager when using OE5. For these purposes, it is assumed that: " You have at least two locations defined in Location Manager Got all that? Okay, let's get started. |
Top |
Tutorial |
A quick look at Mailsmith Before I switched to OE5, I used another excellent email client: Mailsmith, by Barebones Software. " Mailsmith lets you enable or disable accounts depending on which location you're at. " Mailsmith's "Check Mail" command only checks the active accounts for the current location.
So what do we want OE5 to do? OE5 can actually do a fair bit more than Mailsmith, in terms of Location Manager integration. In order to replicate Mailsmith's features in that area, and generally make life more simple for ourselves, we want to make OE5 do these things: 1. Have a default account for each location, which is always used for sending and receiving email. 2. Have schedules for each account, which are only active when we're at certain locations. 3. Most importantly, only check/send for certain accounts, depending on our current location, when we choose to manually check and send email. This tutorial will show you how to do all of the above, using OE5 and a little bit of AppleScript. We'll cover the above objectives in order.
Setting a default account for each location By "default account", we mean the account which will be used as the "from" account when making new email messages. OE5 lets you easily set a default account for each location. Before we actually do that, there's an important point about OE5 that we have to understand before we'll really see how to change Location Manager-related settings. You'll notice that there aren't any controls or settings in OE5 which list all your Location Manager locations, so you may be wondering how exactly you know what your settings are for any location. The answer is that OE5 remembers the settings you make whilst you're at each location. This means that you must switch to each of your locations (using Location Manager), and then make the settings in OE5. Then switch to another location, make your settings for that location, and so on. Get used to this concept, since it's how OE5 deals with all Location Manager-related settings. Now we can actually set default accounts for each location. Let's take a look at the Accounts window (accessible from the Tools menu). Your Accounts window will look much like the picture above. Notice how one of the accounts is in bold text - that's the default account for the current location. Notice also the "Make Default" button, which is only enabled when you've selected an account which isn't the current default (obviously). OE5 will remember which account you make the default for each location. To make default accounts for each location, do this: 1. Choose the default account for your current location. Select that account, and click the "Make Default" button. 2. Now, switch to another location using Location Manager. Most people use the Location Manager Control Strip Module for this. 3. Now select the default account for this new location, and again click the "Make Default" button. Notice how the account name becomes bold. 4. Now repeat steps 2 and 3 for each other location you have (if any). You can switch between locations, and notice how OE5 has remembered which account you chose as the default. There's just one other thing we have to do in order to make sure that OE5 uses the default account for each location when making new email messages. To do this, perform the final step below. 5. Open the Preferences dialog (Edit menu). Click the "Compose" tab. Now make sure that the "Always reply using the default account" checkbox is checked. In the picture below, the arrow cursor is beside that option. That's it! Now, OE5 has default accounts for each location, and will use those accounts when you reply to email or make new messages. Let's move on to our second objective.
Making location-sensitive Schedules for each Account What we're going to do here is make a Schedule to check email for each account. Then, we're going to make sure that those Schedules are only enabled (and thus only active) when we're at the appropriate location. Let's dive straight into it by looking at the Schedules window. |
The first thing to notice is those checkboxes at the left hand side of the window; labelled "Enabled". These checkboxes obviously determine whether the Schedule is enabled or not. The not-so-obvious part is that those checkboxes are location-sensitive. So, you can disable a Schedule, then switch to another location and enable it - and those settings will be remembered for each location. When a Schedule is not enabled, it won't run. Okay. The first thing to do is make a Schedule to check for each account. That is, one Schedule for each account. To make a Schedule to check email for an account, do this: 1. Click the "New" button at the top left of the Schedules window. A new Schedule window appears, as shown below. |
2. Set the options in the "When" section for whenever you want the Schedule to check your email. 3. Set the option in the "Action" section by choosing "Retrieve Mail" from the popup on the left, then choose the name of one of your accounts from the "from" popup which appears on the right. 4. Name your Schedule appropriately (something like "Check AccountName" is good), then click OK. Then, repeat steps 1-4 until you have one Schedule to check each account. Now we have to make sure that those Schedules are only enabled when we're at the appropriate locations. As you've guessed, this is done by switching locations then enabling or disabling the "Enabled" checkbox in the main Schedules window. So: 5. Switch locations using the Location Manager Control Strip Module (or using the Location Manager control-panel, if you prefer), then enable or disable each Schedule as appropriate. Remember that these settings will be remembered for each location. Repeat step 5 for each location. You've now created Schedules to check email for each account, and you've made sure that those Schedules are only enabled for the appropriate locations. We've now done two of the three things we wanted. Now, we just have to make sure that, when we tell OE5 to check and send email, it only does so for the appropriate accounts, depending on our current location. OE5 doesn't natively provide that functionality, but we can do it with a little bit of help from AppleScript. Read on to find out how.
Making "Send & Receive All" location-sensitive Before we can accomplish this task, we need to clarify a few things. We've already talked about Schedules above, and we've looked at the Schedules window. Whilst you were looking at the Schedules window, you might have noticed that one of the Schedules was in bold text. It's not a location-sensitive thing; the same Schedule is always in bold. The reason is that the bold Schedule is a special one, which you cannot delete, and which is very important to what we're trying to do here. That Schedule is called "Send & Receive All" (though you can change its name if you want to). Unlike any other Schedules, there are extra ways you can trigger the Send & Receive All Schedule, besides the normal scheduling methods. Take a look at the main Outlook Express window. If you've chosen to show the toolbars (which are shown by default), then you'll see a lot of buttons at the top of the window. The buttons have names like "New", "Reply", "Flag", "Print", and so on. Near the right of the toolbar, you'll see a button called "Send & Receive". If you hold down the cursor on that button, you'll see a menu of options, pictured below. Note that, if you just click the button, it's the same as choosing the "Send & Receive All" option. You'll have noticed that this option has the same name as the special Schedule we mentioned a moment ago. That's because the "Send & Receive" button is just an extra way to trigger the "Send & Receive All" Schedule. As you can see from the popup menu, you can also trigger the "Send & Receive All" Schedule by using the keyboard shortcut command-M. But that's not all. You can also trigger the "Send & Receive All" Schedule in two other ways; both of which are menu commands. See the pictures below.
So, we've figured out that the "Send & Receive All" Schedule is important. It's a convenient way to check and send our email, without having to wait for a conventional Schedule to activate. We can check or send email manually, whenever we want to. Every email client has such a feature, but we want to make it location-sensitive. But what do we mean by location-sensitive? We already made Schedules to check each account depending on our current location. We want OE5, when we invoke the "Send & Receive All" Schedule (by any of the possible methods above), to only check and send for certain accounts. The bad news is that OE5 cannot do this by itself. The good news is that we can easily add a simple AppleScript which gives it that new ability. Before we talk about the AppleScript, let me point out that you may have thought that OE5 can already check/send only certain accounts depending on location. The reason you may have thought so is because you'd noticed an option in the window for each account. That option, called "Include this account in my 'Send & Receive All' schedule'", is shown below. If that option was location-sensitive (like so many other things in OE5), then our problem would be solved. However, it's not location-sensitive. Perhaps Microsoft will add this functionality in future versions of OE, but for now we have to use an AppleScript. Clearly, in order to determine which accounts to check or send mail for, our AppleScript has to be able to figure out what location we're currently at. We could do this by launching Location Manager, and using AppleScript to ask it what the current location is. However, there's an easier way, which we can do totally within OE5. Remember how we made Schedules for each account, and only enabled those Schedules for the appropriate location? That means that we can simply check to see which Schedules are currently enabled, and we'll know which location we're at. Think about that for a moment if you're not sure what I mean. So, our AppleScript can just check what Schedules are enabled, and thus find out what location we're at, then just check and send mail for the appropriate accounts only. We'll just make our "Send & Receive All" Schedule run the AppleScript, and we'll have accomplished everything we wanted. So, let's make our AppleScript. Below is a picture of the AppleScript code for this. Note that the names of the Schedules and accounts obviously won't be the same as yours; you'll just change the names to fit what you called your own accounts and Schedules. To save you some typing, I've made a sample AppleScript of the script. You can download it here. Follow these steps to make your script and use it for your "Send & Receive All" Schedule: 1. Make a new script in Script Editor. Or, download the one I've made for you. 2. Edit the account names and Schedule names to fit your own. 3. If you're comfortable with AppleScript, and have more complex location-account settings, add further "else if" branches to the script to cater to your specific needs. If you need help with AppleScript, see the Resources section at the bottom of this page. 4. Save your script somewhere handy, like in your OE5 "Script Menu Items" folder. 5. Now open the Schedules window (Tools -> Schedules), and open the "Send & Receive All" Schedule. |
6. Choose options in the "When" section to decide when the script will run. Make sure that at least one of them is "Manually". You may even want to make "Manually" the only occurrence, as I have. Also make sure that the "Only if connected" checkbox is not checked, so that you can make OE5 check mail even when you're not connected to the internet (this will naturally make OE5 initiate an internet connection when you invoke the "Send & Receive All" Schedule). 7. Make sure that there's only one action in the "Action" section. If you need to remove an action, just click on it then click the "Remove Action" button. Set the action to "Run AppleScript". Now click the "Script..." button and choose the AppleScript you made. 8. Make sure that the "Send & Receive All" Schedule is enabled for each location, by switching to each location and ensuring that the "Enabled" checkbox for the Schedule is checked. Note that it's enabled by default for all locations. That's it! Now, when you click the "Send & Receive All" button (or use any of the other methods of invoking the "Send & Receive All" Schedule), only the appropriate accounts will be checked or sent to. Your copy of OE5 now has all the Location Manager integration functionality of Mailsmith, and a lot more besides. If you want to learn more about AppleScript, Mailsmith, OE5 or the companies who created them, check out the Resources section below. |
Top |
Resources |
Here are a few resources on the web you might be interested in. " The Unofficial OE Page (everything you could want, includings scripts, tutorials, reviews and more) " Microsoft Outlook Express 5 download (download OE5 free from here) " AppleScript home (lots of AppleScript info and links from Apple Computer) " Microsoft Outlook Express 5 product home (read the OE5 blurb) " Apple Computer (makers of Location Manager, AppleScript, and the Mac OS) " Microsoft Corporation (makers of Outlook Express 5) " Microsoft MacTopia (Macintosh-specific products and info from Microsoft) " Barebones Software (makers of Mailsmith) " Mailsmith product home (read the Mailsmith blurb) |
Top |
Copyright © 2001 Scotland Software |