Aquí hay un ejemplo AppleScript que establece position de window 1 de Quick Time Player en {533, 118} , si es < em> running y el window existe.
if application "QuickTime Player" is running then
try
if (count windows of application "QuickTime Player") is greater than 0 then
tell application "System Events" to set position of window 1 of application process "QuickTime Player" to {533, 118}
end if
end try
end if
Esto se puede guardar como un script o aplicación o incorporarse en un Automator workflow como un Servicio y asignó un método abreviado de teclado , si lo prefiere.
Aquí hay un ejemplo AppleScript en el que puede ingresar el {x, y} position info como un valor separado por espacio en un display dialog caja :
if application "QuickTime Player" is running then
try
if (count windows of application "QuickTime Player") is greater than 0 then
tell application "QuickTime Player"
set theReply to (display dialog "Move window to position, e.g.: 533 118" default answer "533 118" buttons {"Cancel", "OK"} default button 2 with title "Enter Windows X Y Coordinates")
end tell
tell application "System Events" to set position of window 1 of application process "QuickTime Player" to {word 1 of text returned of theReply as integer, word 2 of text returned of theReply as integer}
end if
end try
end if
Tenga en cuenta que puede establecer default answer "533 118" en default answer "" , si no desea establecer un valor predeterminado.