Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

An AppleScript to help open Exchange-style links Network
I connect my Mac to an exchange server every day at work. I am also Microsoft Entourage user. Often times, I will receive an email from someone with a link pointing to a file; the link is in this format:
<file:///\\amber\Letters\Doctors\moo%20at%20home.ppt>
The link is often highlighted similar to a URL, except that when I click on the URL, it throws errors because it doesn't recognize the file format. I wrote a simple AppleScript that will transform the Windows-formatted file URL into a Mac-readable one -- it will automatically open when you select it. I make no claims that it will work for you, but it does work for me and a few other people that also use the Mac where I work.

Disclaimer: You will more than likely have to make changes to get it to work for you. If there is a better way to do this, please share with the rest of us. One thing to note, for instance, is how the volume mounts. In my case, sometime the file URL will say:
<file:///\\amber....etc.>
But when it mounts, it is actually AMBER, not amber. For another machine, it may be Amber. The point is that you will have to correct the portion of the script that contains amber if it doesn't work. You must highlight the file URL between the angled brackets. You must be connected to the server. You must also have checked "Enabled access for assistive devices" under Universal Access in System Preferences.

Compile the script an place it in ~/Documents/Microsoft User Data/Entourage Script Menu Items. If you like, you can give it a hot key at the end of the file name such as foocC.scpt -- the script can then be activated with a hotkey; Control-C in this case. Please note that other changes may include %20 actually being spaces such as:
<file:///\\amber\Letters\Doctors\moo at home>
If you are dealing with spaces, then just change the line that reads set mynull to "%20" to set mynull to " ".

[robg adds: I haven't tested this one...]
    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[6,549 views]  

An AppleScript to help open Exchange-style links | 3 comments | Create New Account
Click here to return to the 'An AppleScript to help open Exchange-style links' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
An AppleScript to help open Windows-style file links
Authored by: emale on Feb 25, '05 02:43:28PM
I'm not sure if the links in your E-Mails are the same than the windows pendant of the macinsoth aliases, but for the window aliases on server-volumes I use the Freeware WinShortcutter.

[ Reply to This | # ]
An AppleScript to help open Windows-style file links
Authored by: roncross@cox.net on Feb 26, '05 01:43:18AM

This doesn't really work for me. In the email, the file is of the type

<file:///\\Amber\Letters\Doctors\moo%20at%20%home.ppt

These are not alias. I have downloaded WinShortcutter and it works if I take a file off the window exchange server and double click on it. It doesn't work if I double click on the window file format above.

The applescript is the only way I know how to do this right now. I will continue to work on it to improve it. The applescript is easy for me since all I do is to highlight the file url and hit my hotkey. Other people at work has used the script without any problem.

By the way, you can change the script to also work with Apple Mail, however, the script will have to be changed slightly to get it to work with Apple Mail

thanks for the suggestions.

RLC

---
rlc



[ Reply to This | # ]
There's no "windows pendant of the macinsoth aliases"
Authored by: VRic on Feb 26, '05 09:10:03PM

Unless things changed while I wasn't looking, there's no such thing as a "windows pendant of the macinsoth aliases", because aliases are only made possible by the file ID feature of the HFS/HFS+ filesystem, missing from PC filesystems.

Windows "shortcuts" were M$ lousy imitation of System 7's aliases, in pure M$ vein: somewhat demo-level on-screen similarity at first glance, crummy execution, lesser features, maximal unreliability, confusing name ("shortcut" being at the time a well established diminutive of "keyboard shortcut", which happen to be yet another example of M$ sloppiness — "keyboard whortcuts" as promoted by Mac UI guidelines being a very different feature from "keyboard access", with the difference lying in "shortcut": a time-saving feature for most often used commands, not a way to "free" one self from the mouse).

This means that whereas a Windows "shortcut" is nothing more than a textual record of the path to something at the moment the shortcut is created (thus easily broken by any alteration of the original's path or name), an alias refers to the unique ID of a file or folder on a volume, which is totally independant of its location, thus impervious to any kind of alteration: you can rename and move the original as much as you want, you can't break the alias unless you actually delete the original (or "move" it to another volume, which is really copying + deleting).

Actually aliases record both path and FileID to allow some sort of auto-repair: the path is stored each time an alias is accessed, in order to rebuild the alias using the last known path if the original happened to be replaced by another similarly named, but different, item (in case for example an application wouldn't "save" to an open file but instead build a temp file in memory and replace the original with a new one when saving, thus creating a new file with a different file ID in place of the previous one).

This fail-safe path can even be relative instead of absolute: at least using the Finder in older versions of Mac OS (I didn't try since OSX) to copy a bunch of files and folders containing both originals and aliases tends to make the aliases relative so that the copies won't refer to the "real" originals but to their copy. This is what allows you to copy a Mac OS 8 system folder to anywhere on any volume and have that copy work as intended, with the alias of its Control Panels folder in the Apple Menu folder showing this particular system's Control Panels folder and not the "real" original in the old system folder that was copied.

Apple lost sight of those most unique and excellent Mac-only features since Mac OS X, which stupidly won't show you the last known path of an alias when it breaks (thus not telling you the name of the "missing volume" where to find the orignal in case you made an alias of something on a removable disk). Which is extremely annoying, especially compared to Windows stupid shortcuts that would at least give you a chance to find out on what CD you found that original. Same thing with iTunes, which will ONLY tell you where a file is IF it's currently accessible, meaning if it isn't it won't help you find which disk to mount to play it.



[ Reply to This | # ]