Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: is application busy



At 4:54 PM -0500 1/9/07, Bob Cuilla wrote:
I am scripting iphoto and would like to know when it is done saving its contents to the library
I know on can do this sort of thing


	tell app "System events"

	if(process "iphoto") exists

	-- more stuff here

	end tell


to tell if an app is running.

can you also use "system events" to see if an app is busy ( or still busy) saving to disk?

There is no such thing as asking an app whether it's busy saving to disk. What I would do is: check whether iPhoto is responsive or not while it's saving. If it's not you can perform repetitively a line such as:


try
	with timeout of 1 seconds
		tell app "iPhoto" to get 1+1
	end timeout
	-- iPhoto is responsive
on error
	-- iPhoto is not responsive, maybe busy?
end

Emmanuel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-users/email@hidden
Archives: http://lists.apple.com/mailman//archives/applescript-users

This email sent to email@hidden
References: 
 >is application busy (From: Bob Cuilla <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.