I would like to save an image and then open it later, when opening stack again.
To save the image I'm using this code:
Code: Select all
put the long id of image imageName to longIDofImageName
export image longIDofImageName to file ("file:" & specialFolderPath("documents") & slash & "customPreview.png") as PNG
Code: Select all
put specialFolderPath("documents") into tFolderPath
put tFolderPath & "/customPreview.png" into tFilePath
set the filename of image "previewImage" to file tFilePath
Code: Select all
put URL ("file:"& tFilePath) into image "previewImage"

I read documentation and examples but I'm afraid I'm missing something...