• 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: Determine if file is already open
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >Re: Determine if file is already open (From: Raymond P Reedy <email@hidden>)

  • Prev by Date: Re: Determine if file is already open
  • Next by Date: Ideas to delete duplicate emails from Inbox?
  • Previous by thread: Re: Determine if file is already open
  • Next by thread: Leopard Applescript Changes?
  • Index(es):
    • Date
    • Thread