• 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: System Events Info
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: System Events Info


  • Subject: Re: System Events Info
  • From: Mark Thomas <email@hidden>
  • Date: Tue, 10 May 2005 18:27:10 +0100
  • Organization: Coderus Ltd

That does look good. I wish I knew this straight off, I'm not very good with
AppleScript as when I see the dictionary it just confuses me what I'm
suppose to do. Are there any good reference's for learning this language and
knowing what to do.

As this seems like the route to close a window. How would I get a list of
all window the finder has open, and then just close the ones which has a
path starting with "/Volumes/Dev". I have seen there is an attribute called
path, so I guess I can use that, but what about getting the list of open
windows and iterating them ??

Thanks
Mark.

> what about :
>
> tell application "Finder" to close window "dev" ?
>
>
> On May 10, 2005, at 5:44 PM, Mark Thomas wrote:
>
>
>> Thanks, what I want to do is close a specific window in the finder.
>> I have
>> tried
>>
>> Tell application "System Events"
>>   close window "Dev"
>> End tell
>>
>>   But then for an error NSReceiverEvaluationScriptErr: 4 :-(. "Dev"
>> is the
>> name of the window in the finder which is of path "/Volumes/Dev".
>>
>> Any idea's - I like the keystroke approach, but not sure how I get
>> it to be
>> directed at a particular window.
>>
>> Thanks
>> Mark.
>>
>>
>>
>>>
>>> System Events!
>>>
>>> The easiest thing to do is probably to make sure that the window you
>>> want to close is frontmost and then:
>>>
>>> tell application "System Events"
>>> keystroke "w" using command down
>>> end
>>>
>>> HTH
>>>
>>> Simon Forster
>>> _____________________________________________________
>>> LDML Ltd, 62 Pall Mall, London, SW1Y 5HZ, UK
>>> Tel: +44 (0)70 9230 5244   Fax: +44 (0)70 9230 5247
>>> _____________________________________________________
>>>
>>>
>>>
>>>
>>
>>  _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Applescript-users mailing list      (Applescript-
>> email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>> 40libertysurf.fr
>>
>> This email sent to email@hidden
>>
>>
>
>
>
>

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: System Events Info
      • From: Andrew Oliver <email@hidden>
References: 
 >Re: System Events Info (From: Le Stang Jean-Baptiste <email@hidden>)

  • Prev by Date: Getting the full path of an applescript application
  • Next by Date: Re: Getting the full path of an applescript application
  • Previous by thread: Re: System Events Info
  • Next by thread: Re: System Events Info
  • Index(es):
    • Date
    • Thread