Re: choose file of type {}
Re: choose file of type {}
- Subject: Re: choose file of type {}
- From: KOENIG Yvan <email@hidden>
- Date: Sat, 25 Oct 2008 12:54:02 +0200
Oops,
even with 'of type {"com.apple.package"}'
the iWork's documents remain grayed so I must remove the type request:
--[SCRIPT]
set permitted to {"com.apple.iwork.numbers.numbers",
"com.apple.iwork.pages.pages", "com.apple.iwork.keynote.key",
"com.apple.iwork.numbers.template", "com.apple.iwork.pages.template",
"com.apple.keynote.kth"}
tell application "System Events"
if my quelOS() < "1050" then
set leDoc to choose file with prompt "Choose an iWork’s document"
of type permitted
else
set leDoc to choose file with prompt "Choose an iWork’s
document" (* no type specs *)
if type identifier of leDoc is not in permitted then error "“" &
(leDoc as Unicode text) & "” is not an iWork’s document!"
end if
end tell
--========
on quelOS()
local hexData, hexString
set the hexData to system attribute "sysv"
set hexString to {}
repeat 4 times
set hexString to ((hexData mod 16) as string) & hexString
set hexData to hexData div 16
end repeat
return hexString as string
end quelOS
--========
--[/SCRIPT]
Yvan KOENIG (from FRANCE samedi 25 octobre 2008 12:52:38)
_______________________________________________
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