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