Hi.
I have putted inside a droplet two file and a folder.
the droplet have this script inside “on run”
on run
set Legenda to the quoted form of POSIX path of (path to resource "Legenda.rtf")
set LanguageGuide to the quoted form of POSIX path of (path to resource "LanguageGuide.pdf")
- here the problem!!!!!!!
set icone to the quoted form of POSIX path of (path to resource icone)
set box to display dialog "AppleScript Reference" buttons {"Legenda", "LanguageGuide", "Icone"} default button 1 with icon 1
set b to button returned of box
if b is "Legenda" then do shell script "open -e " & Legenda
if b is "LanguageGuide" then do shell script "open -a /Applications/Preview.app " & LanguageGuide
if b is "Icone" then do shell script "open " & icone
end run
if i try to open “Legenda.rtf” and “LanguageGuide.pdf” I have no problem, but how can i say to the script that Icon is a folder, not a varible? (and open it?)
set icone to the quoted form of POSIX path of (path to resource "icone") --> '/path/to/me/Contents/Resources/icone/'
set icone to (path to resource "icone") --> alias path:to:me:Contents:Resources:icone:
Note: path to resource doesn’t work in Script Editor, only starting the application bundle directly
It continuing to say me “Resource not found”
(yes, i try to starting the application bundle directly, not from the scripteditor).
Inside the bundle I have a rtf file and a PDF: those file have no problem, and the bundle opens them fine, it seems to have problem olny with this folder. Have I to change the name?
Note: path to resource doesn’t work in Script Editor, only starting the application bundle directly
on run
set Legenda to the quoted form of POSIX path of (path to resource "Legenda.rtf")
set LanguageGuide to the quoted form of POSIX path of (path to resource "LanguageGuide.pdf")
set IC_folder to (path to resource "icone") --> alias path:to:me:Contents:Resources:icone:
set box to display dialog "AppleScript Reference" buttons {"Legenda", "LanguageGuide", "Icone"} default button 1 with icon 1
set b to button returned of box
if b is "Legenda" then do shell script "open -e " & Legenda
if b is "LanguageGuide" then do shell script "open -a /Applications/Preview.app " & LanguageGuide
if b is "Icone" then tell application "Finder" to open IC_folder
end run