• 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: file is already open & file wasn't open
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: file is already open & file wasn't open


  • Subject: Re: file is already open & file wasn't open
  • From: Michelle Steiner <email@hidden>
  • Date: Sat, 21 Apr 2007 13:17:49 -0700

On Apr 21, 2007, at 12:57 PM, deivy petrescu wrote:

Try this:

Script 1 log:

tell current application
open for access alias "Dora:Users:michelle:Desktop:TUntitled.txt"
244
write "Hello world" to alias "Dora:Users:michelle:Desktop:TUntitled.txt"
display dialog "File not open with write permission.
-61"
{button returned:"OK"}
open for access alias "Dora:Users:michelle:Desktop:TUntitled.txt"
245
close access 244
write "Hello world" to alias "Dora:Users:michelle:Desktop:TUntitled.txt"
display dialog "File not open with write permission.
-61"
{button returned:"OK"}
end tell


Script 2 gives me two results:
tell current application
	close access alias "Dora:Users:michelle:Desktop:TUntitled.txt"
		"File alias Dora:Users:michelle:Desktop:TUntitled.txt wasn't open."

or this:
tell current application
close access alias "Dora:Users:michelle:Desktop:TUntitled.txt"
open for access alias "Dora:Users:michelle:Desktop:TUntitled.txt" with write permission
"File file Dora:Users:michelle:Desktop:TUntitled.txt is already open."



-- Michelle

--
I'm at an age where I can satisfy my wants without too many guilt feelings.


_______________________________________________
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: 
 >file is already open & file wasn't open (From: Gil Dawson <email@hidden>)
 >Re: file is already open & file wasn't open (From: deivy petrescu <email@hidden>)
 >Re: file is already open & file wasn't open (From: Michelle Steiner <email@hidden>)
 >Re: file is already open & file wasn't open (From: deivy petrescu <email@hidden>)

  • Prev by Date: Re: file is already open & file wasn't open
  • Next by Date: Re: file is already open & file wasn't open
  • Previous by thread: Re: file is already open & file wasn't open
  • Next by thread: Re: file is already open & file wasn't open
  • Index(es):
    • Date
    • Thread