Access Resource Files

Klaus major-k klaus at
Fri Sep 20 06:19:30 EDT 2019


> Am 20.09.2019 um 12:10 schrieb JB via use-livecode <use-livecode at>:
> Now this is interesting!
> I added the code snipped you just gave me and put
> it above your other code.
> When I clicked the button it worked like a charm as
> far as copying the file to the desktop.  That is great!
> But for some reason the answer dialog appeared
> like it should but it was empty.  How did adding
> this before the other code make a difference and
> how can I make it work without it?

made a test on my own with the same script and with "Copy files",
the resulting file on my desktop has an icon and is an exact copy of 
the original file.
answer specialfolderpath("resources")
put specialfolderpath("desktop") & "/mypic.jpg" into tTargetFile
put specialfolderpath("resources") & "/3d3.jpg" into tSourceFile
if there is not a file tTargetfile then
  put url("binfile:" & tSourceFile) into url("binfile:" & tTargetFile)
end if

And MY answer dialog showed the correct path!?
What version of LC are you using on what macOS version?

specialfolderpath("resources") in a standalone gave me:
(my desktop folder)/

Maybe you need to create that _MacOS folder when copying your
files manually into the standalone.

> Thank you very much!
> JB



Klaus Major
klaus at

More information about the use-livecode mailing list