• 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: How do I know when an open "is finished to run" ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I know when an open "is finished to run" ?


  • Subject: Re: How do I know when an open "is finished to run" ?
  • From: KOENIG Yvan <email@hidden>
  • Date: Wed, 12 Dec 2007 15:46:30 +0100

Hello Emile

This time it works.

I no longer check the size of the resulting file but the size of its container.

set TargetItem to choose file
set p2d to (path to desktop) as alias
tell application "Finder"
	-- get a reference to the item I want to open
	-- set TargetItem to item 1 of front window

	-- get a reference as alias to this file
	set CompactedItem to TargetItem as alias

	-- open the compacted item (decompress the file)
	set nameExt to name extension of CompactedItem
	if nameExt is "zip" then
		set theContainer to (container of CompactedItem) as alias
	else if nameExt is "dmg" then
		set theContainer to p2d
	else
		set opener to ""
	end if

	if theContainer is not "" then
		open CompactedItem
		set eSize to physical size of theContainer
		repeat
			if physical size of theContainer = eSize then exit repeat
			set eSize to physical size of theContainer
		end repeat

	end if
end tell -- to Finder

Yvan KOENIG
_______________________________________________
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: 
 >How do I know when an open "is finished to run" ? (From: Emile Schwarz <email@hidden>)

  • Prev by Date: Fwd: How do I know when an open "is finished to run" ?
  • Next by Date: Re: Login Item AS Application Bundle Not Targeted
  • Previous by thread: Re: How do I know when an open "is finished to run" ?
  • Next by thread: Re: How do I know when an open "is finished to run" ?
  • Index(es):
    • Date
    • Thread