Cocoa Bindings

Hey guys, im trying to execute a applescript from inside a applescript application, currently i have “run script” but what i want is a way so a user can press a button and they get a window to select the script. which it is then saved in the preference file

prefrence file like in system Preferences? or your preferences on the application? What preference file?
Need more info

as in the preferences of a application, i know how to use the basic cocao bindings to do a preference but i cant work out how to bring a file explorer to find a file and make it save the location it retrives

What about choose file?

on clicked(theObject) -- maybe a button near a text field
	choose file without invisibles
	tell user defaults to set content of default entry "whatever" to (result as unicode text)
end clicked

Thanks heaps that works excellent now but the way it saves the path is causing errors