Opening folders from Rev

Ken Ray kray at
Wed Oct 23 02:48:01 EDT 2002


You can do it completely with Transcript... here's a way to do it on
Windows, Mac OS X and OS 9. The Windows version is a little sneaky as it
takes advantage of aliases, but it works nonethelss. I'll be posting this
tip on my site tomorrow
( as my FTP
server is temporarily down, but in the meantime, here's the code:

on mouseUp
  answer folder "Get a folder:"
  if it <> "" then
    OpenFolder it
  end if
end mouseUp

on OpenFolder pPath
  switch (the platform)
  case "Win32"
    create alias "C:/Temp.lnk" to file pPath
    set the hideConsoleWindows to true
    get shell("C:\Temp.lnk")
    delete file "C:/Temp.lnk"
  case "MacOS"
    if the systemVersion >= 10 then
      get shell("open " & pPath)
      put "tell application " & quote & "Finder" & quote & cr & \
        "activate" & cr & \
        "open folder " & quote & pPath & quote & cr & \
        "end tell" into tScript
      do tScript as AppleScript
    end if
  end switch
end OpenFolder


Ken Ray
Sons of Thunder Software
Email: kray at
Web Site:

----- Original Message -----
From: "Mike Brown" <mike at>
To: <use-revolution at>
Sent: Tuesday, October 22, 2002 2:25 PM
Subject: Opening folders from Rev

> Anyone know a method for popping open a folder (directory) from Rev in Win
> and/or Mac OS?  I want to allow users of my app to open a folder and grab
> files while still in the Rev app.
> Thanks,
> Mike
> _______________________________________________
> use-revolution mailing list
> use-revolution at

More information about the use-livecode mailing list