Re: How do I know when an open "is finished to run" ?
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