Re: Determine if file is already open
Re: Determine if file is already open
- Subject: Re: Determine if file is already open
- From: deivy petrescu <email@hidden>
- Date: Sat, 3 May 2008 15:32:00 -0400
On May 3, 2008, at 15:18, Raymond P Reedy wrote:
On May 3, 2008, at 15:00 , email@hidden
wrote:
Ray,
Here's one of many ways;
tell application "Finder" to set appRunning to (processes whose name
= "Safari") ≠{}
ignoring application responses
if not appRunning then launch application "Safari"
end ignoring
On May 2, 2008, at 3:04 PM, Raymond P Reedy wrote:
Before I issue an "Open File" command to the Finder, how do I
determine if the file is already open?
Thanks. That tells me if the App is open. I want to know if
particular file is already open before I issue an 'OPEN' command.
Ray
Raymond P Reedy
email@hidden
Ray:
tell application "Finder" to exists window "full_file_name" of
application process "App_name"
alternatively
tell application "System Events" to exists window "full_file_name" of
application process "App_name"
This will return "true" or "false".
Deivy _______________________________________________
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