• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: choose file of type {}
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >choose file of type {} (From: Rainer Standke <email@hidden>)
 >Re: choose file of type {} (From: Luther Fuller <email@hidden>)
 >Re: choose file of type {} (From: Philip Aker <email@hidden>)
 >Re: choose file of type {} (From: Luther Fuller <email@hidden>)
 >Re: choose file of type {} (From: Rainer Standke <email@hidden>)
 >Re: choose file of type {} (From: Christopher Nebel <email@hidden>)
 >Re: choose file of type {} (From: Philip Aker <email@hidden>)
 >Re: choose file of type {} (From: Christopher Nebel <email@hidden>)
 >Re: choose file of type {} (From: KOENIG Yvan <email@hidden>)

  • Prev by Date: Re: choose file of type {}
  • Next by Date: Re: How to simulate C's function pointer in AppleScript?
  • Previous by thread: Re: choose file of type {}
  • Next by thread: Re: choose file of type {}
  • Index(es):
    • Date
    • Thread