Newbie question...

hi i am an absolute beginner and i have a problem…how can i handle this problem…also i have a textfield and a button and when i type a number in the textfield and press the button the script should search in a specific path a folder with the same number and open it.
hopefully someone kann helb me…

MacStar

If you post your script i am sure someone could help you troubleshoot it :smiley:

set theFolder to choose folder
set theText to "3"
tell application "Finder"
	(files whose name contains theText) in entire contents of theFolder
	open result
end tell

(* This returns a list of files. If you prefer a list of aliases, just
add "as alias list" to the fourth line. If you don't want to search
recursively, just remove "entire contents of" from the fourth line.
Also, you can use "starts with", "is", "is not", or "ends with"
instead of "contains" in the fourth line. *)

Just put in your dialog code for getting the number as the result and the Finder will open the file, as a result.