Code: Select all
on appleEvent pClass, pID
if pClass is "aevt" then
if pID is "odoc" then // file opened on the Finder
request appleEvent data
put it into tFilePath
openDocument tFilePath
else if pID is "pdoc" then // file printed on Finder
request appleEvent data
put it into tFilePath
printDocument tFilePath
else if pID is "oapp" then // app opened on the Finder
put "YES" into createNewWindow
else
pass appleEvent
end if
else
pass appleEvent
end if
end appleEventAll worked fine in LiveCode 6, but compiling with LC 7 I get that the openStack message happens before the appleEvent so I find the variable createNewWindow empty.
Is something changed between 6 and 7 about appleEvent handling? Or maybe it's just that my code is not so reliable how I hoping?
PS
How to create an application that opens when you drag a file onto it
http://lessons.runrev.com/m/4071/l/1592 ... le-onto-it
