• 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
QuickTime Player Window Index Problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

QuickTime Player Window Index Problem


  • Subject: QuickTime Player Window Index Problem
  • From: Christopher Stone <email@hidden>
  • Date: Sat, 4 Apr 2009 22:07:18 -0500

Greetings,

One of the more annoying things about QuickTime Player is that it doesn't reliably open multiple items in a proper sort order.

This script works just fine, except it won't actually make window 1 active - nor will the sort order stick unless you manually click on the front window.

It seems bizarre to me that Cocoa applications won't properly respect the index property.  Is there a work-around other than UI-Scripting?

Thanks.

Christopher Stone


tell application "Finder"
set db to bounds of window of desktop
set deskX to (item 3 of db) / 2
set deskY to (item 4 of db) / 2
end tell

tell application "QuickTime Player"
try
set winBounds to bounds of front window
set winWidth to (item 3 of winBounds) - (item 1 of winBounds)
set winHeight to (item 4 of winBounds) - (item 2 of winBounds)
set newX1 to (deskX - (winWidth / 2)) as integer
set newY1 to (deskY - (winHeight / 2)) as integer
set newX2 to (newX1 + winWidth) as integer
set newY2 to (newY1 + winHeight) as integer
set newBounds to {newX1, newY1, newX2, newY2}

set winBounds to bounds of front window
set winNames to name of windows
set winNames to sortlist winNames
set winNames to reverse of winNames
repeat with i from 1 to (length of winNames)
set index of window (item i of winNames) to 1
set bounds of front window to newBounds
end repeat

on error errMsg number errNum
beep
display dialog errMsg & return & return & "Error Number: " & errNum
end try
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

  • Follow-Ups:
    • Re: QuickTime Player Window Index Problem
      • From: Luther Fuller <email@hidden>
  • Prev by Date: Re: Parallel Processing in AppleScript
  • Next by Date: Mir:ror by violet
  • Previous by thread: Re: Numbers always saves as flat file
  • Next by thread: Re: QuickTime Player Window Index Problem
  • Index(es):
    • Date
    • Thread