@jim said:
This code opens a Windows Exlorer window with the given file selected.
Is there a Mac equivalent?
Is this what you mean?
Tig's code does open the file in 'Finder' and highlights the file title
> file=("/Some/Folder/MyFile.rb") UI.openURL('file:///' + File.dirname(file)) true
Like this it 'opens' in the associated program for that type of file. i.e. TextWrangler opens ruby files on my system.
> file=("/Some/Folder/MyFile.rb") UI.openURL('file:///' + (file)) true
This will also open in 'Finder'
> file = './Some/Folder/MyFile.rb' system("open -R #{file}") true note: returns true/false
> file = './Some/Folder/MyFile.rb' system %(open -R #{file}) true note: also returns true/false
shorthand works as well
>open -R './Some/Folder/MyFile.rb'`` note: NO return of true/false
Without the -R recursive flag it will 'open' in the associated app
Again, it can be with or without the return, dependant on the call syntax.
john