full-path of the folder in the text field!?!

I have trouble with ASS:
I want to choose a folder and then the full-path of the folder must be view in the text field “LabelText”.
How can i do that?
Please help me…
Many thanks.

on clicked theObject
	tell window of theObject
		set theFolder to choose folder with prompt "Open Hotfolder"
		set the contents of text field "LabelText" to theFolder
	end tell
end clicked

What you need to do is coerse the chosen folder to a string. When the user chooses a folder, that returns a folder reference, which by itself can’t be stuck into a field. You have to coerse it to a string object, which is what a field can contain (text).

Try this instead…

on clicked theObject 
   tell window of theObject 
      set theFolder to choose folder with prompt "Open Hotfolder" 
           set theFolder_path to result as string
      set the contents of text field "LabelText" to theFolder_path
   end tell 
end clicked

Many thanks! :lol: