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

Rick Gordon rick at rickgordon.com
Sat Nov 3 17:56:29 PDT 2007


Actually, it turns out that a 3rd party shell command has been created for to reveal files in the Finder:

<http://yost.com/computers/MacStuff/reveal/index.html>

The main downside for my prospective use is that it must be installed on a user's machine.

The AppleScript URL protocol seems quite cool -- and of course, you could embed a do shell script command in that -- but the downside is keeping it short enough. At least in Eudora, the URL won't link properly if its over 255 characters in length.

Rick Gordon

------------------

On 11/3/07 at 1:46 AM -0500, Dave Higgins wrote in a message entitled
"Re: [X-Unix] Standard Protocol Equivalent for Terminal "ope":

>>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)?

-- 
 
___________________________________________________

RICK GORDON
EMERALD VALLEY GRAPHICS AND CONSULTING
___________________________________________________

WWW:   http://www.shelterpub.com


More information about the X-Unix mailing list