Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.5: How to launch-and-hide via AppleScript in 10.5' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.5: How to launch-and-hide via AppleScript in 10.5
Authored by: trosberg on Jan 31, '09 04:43:55AM
To make sure a launching app is ready to accept input (like visible property), I scripted the app to return a user interface element. I believe this is the minimum delay the app needs.
tell application "iTunes"
	try -- We don't need error messages
		get window 1 -- "tell application" goes on until the app has a user interface, or returns an error.
	end try
end tell

tell application "System Events" -- It is better than the Finder.
	set visible of process "iTunes" to false
end tell


[ Reply to This | # ]