Hi, Now I want to get a result like this: “This is “Macintosh HD:desktop folder”” I must use handle to write, the program just like :
on get_result(location_name) set x to "This is "
who knows how to write this part-- return end get_result get_result(“Macintosh HD:desktop folder”)
Thanks a lot!!!
I’m guessing you’re looking for something like this:
on get_result(location_name)
set x to "This is "
--who knows how to write this part--
if class of location_name is not string then
set location_name to location_name as string
end if
set the_result to x & location_name
return the_result
end get_result
-- test:
get_result("Macintosh HD:desktop folder") --with text
set choose_folder to choose folder
get_result(choose_folder) --with alias
Luck,
–tet
Is this what you’re looking for?
on get_result(location_name)
return "This is " & (location_name as text) & ""
end get_result
display dialog get_result("Macintosh HD:desktop folder")