Saving result as file or copying to clipboard

I’m trying to save result of this script as a file or put it on the clipboard (to use then in FileMaker):

tell application “Finder”
activate
get properties of entire contents of container (choose folder)
end tell

The result is a list of all properties of all files and folders in chosen folder.

Whatever I tried, I can’t convert the result into a text string. I’m a beginner however, so I’m probably missing something. I’m using Panther.

Is there a way to do this?

Thanks,
Leo

Leo,
If you run your script in Script Editor with the “Result” button at the bottom of the script window selected, you will see that the result isn’t a list, but a record.
To make a record into a list, you have to build it from the record.

set some_record to {Least_Favorite_Song:"Piano Man", House_Number:123, Wife:"Mary", ratioofcirctodia:3.14159}
set new_list to {}
set the end of new_list to Least_Favorite_Song of some_record
set the end of new_list to House_Number of some_record
set the end of new_list to Wife of some_record
set the end of new_list to ratioofcirctodia of some_record
new_list

It’s interesting that what results from you script is a list of records, one record for each item in the folder. Take a close look at the result window in Script Editor.
I think you can see a better way of placing items into a FileMaker database.
Create your database
Set your list of records (you know how to do that, right?)
Loop through the list using a repeat loop
Get the items you want from each record, name, path, etc
Create a new FileMaker record
Set the fields in the database
That’ll give you a start, I’m sure you will have more questions…
Bill Briggs’s AppleScript Primer is a good overview of AppleScript.

Thanks a lot for your help, Dennis!

I’ll try your solution, and Bill Briggs’s site has tons of info, too.

Yes, I know FileMaker scripting pretty well and once I get the text into FileMaker I can format it any way I want. The way the result looks like after running my original script is actually ggod enough for me.

I still seem to miss the critical point of how actually to “extract” the result from the AppleScript as text (just the way I can see in the Script Editor window). By either saving it as a text file, or copying to clipboard, or bringing directly into FileMaker…

Thanks,
Leo

Alright, I got it!

Had to reread the final part of your post more carefully. As well as read some info on how to work with AppleScript inside FileMaker

Thanks again Dennis!

Leo,
The Apple Events Reference is a very good guide on how to do things like get or assign data to fields. The reference file (it’s a FMPro database, natch) is in the English Extras on the v7 cd, and in the FileMaker and AppleScript folder in previous versions. Previous versions have examples also, that I steal^H^H^H^H^Huse as examples when writing my code.

set someRecord to {firstName:"Dennis", lastName:"Cox"}
set fName to firstName of someRecord
set lName to lastName of someRecord
tell application "FileMaker Pro"
     set cell "First Name" of record 1 of database "Test1" to fName
     set cell "Last Name" of record 1 of database "Test1" to lName
end tell