Re: AS bug ? name extension of f is empty
Re: AS bug ? name extension of f is empty
- Subject: Re: AS bug ? name extension of f is empty
- From: KOENIG Yvan <email@hidden>
- Date: Wed, 25 Feb 2009 10:31:53 +0100
Hi Emile
Are you sure that your reference is a correct one.
Under 10.4.11
--[SCRIPT]
set f to (path to desktop as text) & "dossier sans
titre:DesignLoremIpsumWords - copie.pmf"
tell application "System Events"
log (get name extension of disk item f)
end tell
tell application "Finder"
log (get name extension of file f)
end tell
tell application "Finder"
set ItemReference to (item 1 of (get the selection)) as alias
log (get name extension of ItemReference)
end tell
--[/SCRIPT]
returns this log:
tell current application
path to desktop as text
"Macintosh HD:Users:yvan_koenig:Desktop:"
end tell
tell application "System Events"
get name extension of disk item "Macintosh
HD:Users:yvan_koenig:Desktop:dossier sans titre:DesignLoremIpsumWords
- copie.pmf"
"pmf"
(*pmf*)
end tell
tell application "Finder"
get name extension of file "Macintosh
HD:Users:yvan_koenig:Desktop:dossier sans titre:DesignLoremIpsumWords
- copie.pmf"
"pmf"
(*pmf*)
get selection
{document file "DesignLoremIpsumWords - copie.pmf" of folder
"dossier sans titre" of folder "Desktop" of folder "yvan_koenig" of
folder "Users" of startup disk}
get document file "DesignLoremIpsumWords - copie.pmf" of folder
"dossier sans titre" of folder "Desktop" of folder "yvan_koenig" of
folder "Users" of startup disk
alias "Macintosh HD:Users:yvan_koenig:Desktop:dossier sans
titre:DesignLoremIpsumWords - copie.pmf"
get name extension of alias "Macintosh
HD:Users:yvan_koenig:Desktop:dossier sans titre:DesignLoremIpsumWords
- copie.pmf"
"pmf"
(*pmf*)
end tell
Yvan KOENIG (from FRANCE mercredi 25 février 2009 10:31:24)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden