Handle dropped AppleScript data files


(Stan Cleveland) #1

Hi Mark,

I’m not sure how commonly this is done by others, but I often write an AS list or record to a file, which is later retrieved and utilized by another script as a data source. Something like this in the first script…

set f to open for access pathToFile with write permission
set eof of f to 0
write recordData to f as record
close access f

…followed by this in the second script…

set f to open for access pathToFile
set recordData to read f as record
close access f

It would be nice to be able to inspect these data files without the need for a script to read them. I’d love to see an option for “Paste Contents of File as List/Record” added to the “File Drop Action” panel.

I’m sure you’d know the best way to implement this and, indeed, if it would even be worth adding to SD. I appreciate you considering it.

Thanks,
Stan C.


Enhanced Applets