Estoy escribiendo un applescript en el que necesito la ruta POSIX a un .icns
archivo que selecciona el usuario. Sin embargo, por alguna razón, se niega a aceptar .icns
como un tipo de archivo válido.
Esto funcionará:
set Icon to (POSIX path of (choose file of type {"png"} with prompt "Select a .png file."))
Pero esto no:
set Icon to (POSIX path of (choose file of type {"icns"} with prompt "Select a .icns file."))
Cuando se ejecuta el script, no me permite elegir ningún archivo, incluidos los archivos .icns.
¿Algunas ideas? Gracias.
Además, estoy ejecutando 10.8.5 si ayuda, y si hay una manera fácil de convertir archivos .png a archivos .icns con applescript, también estoy abierto a eso.
Utilizar {"com.apple.icns"}
como tipo de archivo.
set Icon to (POSIX path of (choose file of type {"com.apple.icns"} with prompt "Select a .icns file."))
(Encontrado al ejecutar "mdls myiconfile.icns")
kMDItemContentType = "com.apple.icns"