Two quick questions:

Devin Asay devinasay at
Wed Aug 20 10:51:21 CEST 2014

On Aug 19, 2014, at 11:47 PM, Paul D. DeRocco <pderocco at> wrote:

> 1) What's the simplest way to test if running under the LC IDE versus as a
> standalone?
> 2) For a Mac standalone, how do I get the full path of the .app file,
> which is actually a directory? I'm trying to get the standalone to find a
> custom external .bundle which is actually contained inside the .app file.


Re #2:

In a Mac standalone the defaultFolder property will return the path to the .app file. If you want the path to the executable inside the bundle, use the filename of the stack and chop off the last item. I often include a function like this:

function parentFolder
get the filename of this stack 
set the item delimiter to slash
return item 1 to -1 of it
end parentFolder

That works in the traditional Mac OS X environment; once we have to start using sandboxed apps we may be able to get that info using specialFolderPath(“engine”), as you can now on iOS.



Devin Asay
Learn to code with LiveCode University

More information about the use-livecode mailing list