[X-Unix] Standard Protocol Equivalent for Terminal "open" Command??

Dave Higgins dhiggins at mchsi.com
Fri Nov 2 23:46:25 PDT 2007


> Is there any standard (or easily distributable) protocol  
> (syntactically like http, file, ftp, etc.) that can be prefixed to a  
> POSIX path that can duplicate a Terminal "open" command? So that  
> (assuming that the protocol was "open"):
>
> open:///Library/Application%20Support would open the global  
> Application Support folder in the Finder, or
> open:///Applications/Utilities/Disk%20Utility.app would launch the  
> Disk Utility application, or
> reveal:///Applications/Utilities/Disk%20Utility.app would reveal the  
> Disk Utility application in the Finder?
>
> Some thing like that would be a boon for technical support emails  
> requiring an unsophisticated user to easily access a file or folder,  
> without having to laboriously explain the file path.

I agree that this would be helpful, but I doubt you're going to see  
that much control over a machine by URL, mainly because of security  
concerns. Used correctly and responsibly it could be quite powerful.  
Used maliciously it could raise some serious concerns. At least an  
"open://" type call... Now, this "reveal", on the other hand, would be  
safe. But, alas, I have no idea how to do such a thing.

> <applescript://com.apple.scripteditor?action=new&script=%2D%2DPUT%20MY%20SCRIPT%20HERE%2C%20USING%20ESCAPES%20AS REQUIRED%0A--BUT THEY MAY NOT ALL BE NECESSARY. 
> >

That's pretty cool... Didn't know you could do that...

After doing a little Google searching, I came across an interesting  
free tool... It'll take an AS from the front window of Script Editor  
and create that type of URL (placing it in your clipboard), or even  
make a whole HTML page. You can find it at <http://www.jonn8.com/html/Convert_Script_to_MC.html 
 >.

The whole HTML pages came up with a couple minor flaws for me with  
quick tests, but it can create a good start.

Not "exactly" what you were looking for in the original post, but I  
suppose you could have a link like this open a script in Script  
Editor, then have them just click the "Run" button. Your AS inside it  
could do the opening of the window in Finder, or launch applications,  
or whatever. As much as I hate AppleScript (I'm more of a SuperCard  
user), you can do quite a bit with it if you're willing to endure it.

Any idea where we can get a whole list of protocols handled this way  
(known ones are http, https, file, ftp, and now applescript)?

Dave.


More information about the X-Unix mailing list