Re-2: answer folder "sdsds";launch document it

Jim Ault JimAultWins at yahoo.com
Fri Nov 23 22:52:55 EST 2007


Applescript + POSIX (Portable Operating System for UNIX)
   would work like this
( one of the additions to AppleScript 1.8)
--------------------------------------
Applescript uses the colon ":" as a separator for directories however UNIX
uses POSIX (Portable Operating System for UNIX) file paths in which the
slash "/" is used as the directory separator. This could cause obvious
problems, however one of the additions to AppleScript 1.8 was the ability to
interconvert the two file reference systems.

Open up Script Editor and type/copy :-

set this_file to choose file

set this_file_text to (this_file as text)

display dialog this_file_text

set posix_this_file to POSIX path of this_file

display dialog posix_this_file

set this_file_back to (POSIX file posix_this_file) as string

display dialog this_file_back

The first line allows the user to select a file, the second line converts
the file reference to text and then it is displayed. The fouth line converts
the Apple file reference to the POSIX path and then displays it. Of course
you need to be able to do the reverse translation and the "POSIX file"
command converts the POSIX path to a Mac OS X path as shown below.

Hope this helps

Jim Ault

On 11/23/07 7:18 PM, "Andre Garzia" <andre at andregarzia.com> wrote:

> Klaus,
> 
> you can achieve the same result in Mac OS X with the following shell command:
> 
> cd /your/path/here; open .
> 
> It's cd to the folder you want and then execute "open .", open and a
> space and a dot. This will open the folder in the finder.
> 
> In windows, I don't know but I bet it can be done with vbscript. And
> it also can be done with applescript in mac os x with something like:
> 
> tell application "finder"
>   reveal folder "my folder" in folder "my parent folder" in startup disk
> end tell
> 
> Which I find rather cumbersome, why applescript do not support POSIX
> folders? (actually I think it does, but I don't know how to use them.)
> 
> Cheers
> andre
> 
> On 11/23/07, Klaus Major <klaus at major-k.de> wrote:
>> Hi Mad-Hias ;-)
>> 
>>> I vote for this feature, too.
>>> It´s much easier than using the shell command to open a folder under
>>> windows.
>> 
>> There is a related "enhancement" in the RevQalityCenter.
>> Check bug #5549.
>> 
>> I will add this one tomorrow...
>> 
>>> Matthias Rebbe
>> 
>> Best
>> 
>> Klaus Major
>> klaus at major-k.de
>> http://www.major-k.de
>> 
>> 
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>> 
> 





More information about the use-livecode mailing list