• 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
Fwd: Interarchy is missing windows
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fwd: Interarchy is missing windows


  • Subject: Fwd: Interarchy is missing windows
  • From: Brian Christmas <email@hidden>
  • Date: Wed, 07 Oct 2015 19:23:40 +1100




G’day again scripters

I’v come up with the following code, but it refuses to read the extra ‘windows titles’ menu item, so I’m still at a loss on how to ‘only’ close the ‘Transfers’ window.

Any advice greatly appreciated.

Regards

Santa

tell application "Interarchy"
activate
do shell script ("sleep 0.2")
say (count of windows) --< 2
repeat with x from 1 to (count of windows)
try
set n to name of window x as text
# say n as text
set theWindow to window x
if n is "Transfers" then
tell application "System Events" to tell application process "Interarchy"
set offsetMenu to 11 --< item 10 is original 'Transfers' menu item, which is disabled while window is open.
repeat 20 times
set offsetMenu to offsetMenu + 1
say offsetMenu --< Stops at '15', & new 'Transfers' menu is '16' at least
set temp to (name of menu item offsetMenu of menu 1 of menu bar item "Window" of menu bar 1) as text
try
say temp
end try
if temp as text = "Transfers" then
click menu item offsetMenu of menu 1 of menu bar item "Window" of menu bar 1
exit repeat
end if
end repeat
do shell script ("sleep 1")
try
click button 3 of window 1
end try
keystroke "w" using command down
end tell
end if
on error errmsg number errnum
if errnum is not in {-1719, -1700} then tell application "System Events" to display dialog errmsg & " number " & errnum
end try
end repeat
end tell

 _______________________________________________
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: 
 >Interarchy is missing windows (From: Brian Christmas <email@hidden>)

  • Prev by Date: Interarchy is missing windows
  • Next by Date: Re: Cannot Write to Combo Box with System Events
  • Previous by thread: Interarchy is missing windows
  • Next by thread: Re: El Capitan Mail Snafu?
  • Index(es):
    • Date
    • Thread