• 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
which window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

which window


  • Subject: which window
  • From: Shawn Brady <email@hidden>
  • Date: Fri, 20 Mar 2009 06:24:26 -0400

I am building an Applescript Studio app. I have one Applescript that opens 6 folders, 2 folders on my local drive and 4 other windows, each of which is a destination folder on a different server. I need a way to identify each of the 4 server windows.  So right now I do this:

tell application "Finder"
set a to get bounds of Finder window 1
if item 1 of a is equal to 2940 then -- Omenon
set Omneon_win to target of Finder window 1
else
if item 1 of a is equal to 1998 then -- 1030
set win_1030 to target of Finder window 1
else
if item 1 of a is equal to 2945 then -- ABRAHAM
set ABR_win to target of Finder window 1
else
if item 1 of a is equal to 1994 then -- NPR
set NPR_win to target of Finder window 1
end if
end if
end if
end if
-- repeat for windows 2-6

end tell


and repeat for each of the 6 open windows. So every window gets a variable name based on its 1st bounds number. 


IS THERE A BETTER WAY OF IDENTIFYING EACH WINDOW, THAT IS THE QUESTION. 


Thanks.

 _______________________________________________
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

  • Prev by Date: vcard in Addressbook
  • Next by Date: Fwd: stderr from 'do shell script': Not always in AS error or redirected as expected
  • Previous by thread: Re: timeout block question (Axel Luttgens) (Jim Brandt)
  • Next by thread: Any general way to tell when a scriptable app has finished its task?
  • Index(es):
    • Date
    • Thread