Open application when file double clicked

Richard Gaskin ambassador at fourthworld.com
Tue Feb 24 13:56:27 EST 2015


Peter Haworth wrote:
 > There's a user note in the dictionary that says $1 does not contain
 > the path to the double clicked file on OSX.  Is that true?

I believe so.  OS X may be a certified Unix, but the Finder is off in a 
world of its own. :)

On Linux and Windows that still works, and on both you can quer $# to 
obtain the number of params to see if more than one file was opened with 
the app launch.

On Mac Apple's method has been Apple events since the early '90s. 
Anyone else here able to reproduce the issue Peter's seeing with aevt/oapp?

Could this issue be that you're responding to the odoc event rather than 
oapp?

It's been so long since I wrote any code for that I can't recall, but 
with oapp sent on launch, perhaps odoc only sent when a doc is 
double-clicked any time after launch.

-- 
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  Ambassador at FourthWorld.com                http://www.FourthWorld.com




More information about the use-livecode mailing list