Writing files outside the Mac App
Posted: Thu Dec 11, 2008 4:31 pm
I have a stack that writes files to store the contents of fields:
works fine but when I create a standalone for Mac the files are created inside the App. I can access the contents with a right click, but that isn't too convenient. I've added a folder to the file structure and modified the path to include that folder to put the file at a different level:
Works fine in development, but that doesn't work in the App.
Similarly, I'm creating png files from images with:
and then elsewhere:
but they also are created inside the App.
Is there a way to alter the file paths to produce files outside the App? They also need to work in the PC standalone. Separate folders would be good there too for convenient access.
(Which of these two ways of creating the file path is preferred? they seem to work equally well; the second one is more efficient.)
Code: Select all
put the filename of this stack into P
Delete the last item of P
Open file P & "/" & "TimeSeq" & field "Subject" for write
etc.
Code: Select all
Open file P & "/DataFiles/" & "TimeSeq" & field "Subject" for write
Similarly, I'm creating png files from images with:
Code: Select all
put (item 1 to -2 of the effective filename of this stack) & "/activity1-snapshots" & field "Subject" into tSnapshotPath
create folder tSnapshotPath
Code: Select all
then export image "ImageDrawing" of card "Activity1" to URL ("binfile:"&tSnapshotPath&"/" & the seconds & ".png") as PNG
Is there a way to alter the file paths to produce files outside the App? They also need to work in the PC standalone. Separate folders would be good there too for convenient access.
(Which of these two ways of creating the file path is preferred? they seem to work equally well; the second one is more efficient.)