Hey Klaus,
I got it to work, but not in the way you said. Wanted to share my results and am interested to hear your thoughts.
Code: Select all
put specialfolderpath("resources")
results in nothing, no file path at all. I'm not sure why, but it should produce some kind of text result, yes?
According to the current help files, "engine" is supposed to do something. It does, but the file path is wrong.
Livecode builds two sets of folders for its Mac standalone, and one set is empty. I have no idea if the empty folders have a purpose. The
real folders that
actually get their respective files can be determined by the following code:
Code: Select all
if the platform = "MacOS" and the environment = "standalone application" then
repeat until last item of tPath contains ".app"
delete last item of tPath
end repeat
put (tPath & "/contents/resources/_MacOS") into fld "defaultfolder"
end if
set defaultfolder to fld "defaultfolder"
end if
Code: Select all
set filename of player "check" to (defaultfolder & "/audio conversations/" & gCurrentScenario & "/" & fld "prompt number" & ".mp3")
So yeah, I'm using defaultfolder to access my files, even though you told me not to. Strangely, even without all this "help", my program was always able to determine where to find stuff, except audio files. Perhaps the player object, when setting its source, is much less generous than the rest of the program. Anyway, now the player can find files on the Mac too, and that makes me happy
