¿Existe un método abreviado de teclado para organizar o alinear dos ventanas del buscador?

2

Sé que hubo algunas aplicaciones de terceros que podrían hacer esto en el pasado, pero con cada nueva versión de Mac OS X, parece que muchas de esas aplicaciones de terceros dejan de funcionar o el proyecto envejece y pierde su mantenedor.

Me pregunto si hay un atajo de teclado integrado en Mac OS X para hacer esto. Supongo que esto no se limitaría a las ventanas del buscador, sino a las ventanas de cualquier aplicación.

    
pregunta David Killingsworth 12.07.2018 - 19:27

2 respuestas

1

Por lo que sé, no hay una forma "fuera de la caja" ni ningún método abreviado del sistema para poder alinear u organizar las ventanas del Finder. Sin embargo, al usar Script Editor.app para crear un AppleScript para establecer los límites (tamaño y ubicación) de las ventanas del buscador, puede traer su código de AppleScript finalizado a Automator.app creando un nuevo documento en Automator y seleccionando "Servicio" como el nuevo tipo de documento.

ElsiguientepasoseríaagregarunaaccióndeejecucióndeAppleScriptalflujodetrabajo,luegopegarelAppleScriptmencionadoanteriormente,quecompilamosenScriptEditor.app,enlaaccióndeejecucióndeAppleScriptenAutomator

Acontinuación,guardaríaynombraríaelserviciodeAutomator(lollamé"Arrange Finder Windows"). Después de esto, su nuevo servicio estará disponible en las preferencias del sistema, en cuyo momento puede asignarle un método abreviado de teclado.

AhoraechemosunvistazoalprocesoinvolucradoenlacreacióndelscriptenScriptEditor.app,paramanipularlasventanasdelFinder.AlusarmiMacBookProde15", tengo 5 resoluciones de pantalla diferentes entre las que puedo elegir. Lo que obtengo es si mi resolución de pantalla actual está configurada en" Predeterminado ", sea cual sea el código que cree que manipulará las ventanas del buscador, funcionará correctamente solo cuando estoy usando la resolución de pantalla predeterminada. En un momento posterior, si decido cambiar mi Pantalla más arriba o más abajo, el código que creé al usar la pantalla predeterminada, realmente colocará las ventanas del Finder en diferentes ubicaciones como estaban originalmente significado.

En resumen, el objetivo aquí es poder alinear y organizar las ventanas del Finder (procesando de una a seis ventanas) sin importar qué resolución de pantalla esté usando actualmente.

Estaprimerapartedelsiguientecódigoestablecevaloresdepropiedadparalascincodiferentesresolucionesdepantallaquepuedoelegirenlaspreferenciasdelsistema

--ALLPOSSIBLEDISPLAYRESOLUTIONVALUESINSYSTEMPREFERENCES--propertydisplayRezolution_Lowest:{0,0,1024,640}propertydisplayRezolution_Lower:{0,0,1280,800}propertydisplayRezolution_Default:{0,0,1440,900}propertydisplayRezolution_Higher:{0,0,1680,1050}propertydisplayRezolution_Highest:{0,0,1920,1200}

Elsiguientefragmentodecódigorecuperarálaresolucióndepantallarealqueseestáutilizandoactualmenteenelmonitor

--GETSTHECURRENTDISPLAYRESOLUTIONBEINGUSED--tellapplication"Finder" to set getRezolution to get bounds of window of desktop

El siguiente fragmento de código determina qué objeto de script se ejecutará según la resolución de visualización actual. (Creé cinco objetos de script diferentes, un script para cada resolución de Pantalla ... Cada uno de los cuales contiene valores diferentes para los límites de las ventanas del buscador

-- DETERMINES WHICH SCRIPT TO RUN BASED ON THE CURRENT DISPLAY RESOLUTION --
if getRezolution is equal to displayRezolution_Lowest then
    run script displayRezolutionLowest
else if getRezolution is equal to displayRezolution_Lower then
    run script displayRezolutionLower
else if getRezolution is equal to displayRezolution_Default then
    run script displayRezolutionDefault
else if getRezolution is equal to displayRezolution_Higher then
    run script displayRezolutionHigher
else if getRezolution is equal to displayRezolution_Highest then
    run script displayRezolutionHighest
end if

Aquí está el script completo que se colocará en Automator

-- ALL POSSIBLE DISPLAY RESOLUTION VALUES IN SYSTEM PREFERENCES --

property displayRezolution_Lowest : {0, 0, 1024, 640}
property displayRezolution_Lower : {0, 0, 1280, 800}
property displayRezolution_Default : {0, 0, 1440, 900}
property displayRezolution_Higher : {0, 0, 1680, 1050}
property displayRezolution_Highest : {0, 0, 1920, 1200}

-- GETS THE CURRENT DISPLAY RESOLUTION BEING USED --

tell application "Finder" to set getRezolution to get bounds of window of desktop

-- DETERMINES WHICH SCRIPT TO RUN BASED ON THE CURRENT DISPLAY RESOLUTION --

if getRezolution is equal to displayRezolution_Lowest then
    run script displayRezolutionLowest
else if getRezolution is equal to displayRezolution_Lower then
    run script displayRezolutionLower
else if getRezolution is equal to displayRezolution_Default then
    run script displayRezolutionDefault
else if getRezolution is equal to displayRezolution_Higher then
    run script displayRezolutionHigher
else if getRezolution is equal to displayRezolution_Highest then
    run script displayRezolutionHighest
end if

--  INDIVIDUAL SCRIPT OBJECTS   --

script displayRezolutionLowest
    property savedBoundz6 : {{0, 22, 479, 456}, {480, 22, 959, 456}, {961, 22, 1440, 456}, ¬
        {0, 458, 479, 892}, {480, 457, 959, 891}, {961, 457, 1440, 891}}
    property savedBoundz5 : {{0, 22, 479, 456}, {480, 22, 959, 456}, {961, 22, 1440, 456}, ¬
        {0, 458, 479, 892}, {480, 457, 1440, 891}}
    property savedBoundz4 : {{0, 22, 517, 366}, {518, 22, 1024, 366}, ¬
        {0, 294, 517, 638}, {518, 295, 1024, 639}}
    property savedBoundz3 : {{0, 22, 342, 640}, {343, 22, 684, 640}, {685, 22, 1024, 640}}
    property savedBoundz2 : {{0, 22, 517, 640}, {518, 22, 1024, 640}}

    tell application "Finder"
        if (count of every window) = 6 then
            set theBoundz to savedBoundz6
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 5 then
            set theBoundz to savedBoundz5
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 4 then
            set theBoundz to savedBoundz4
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 3 then
            set theBoundz to savedBoundz3
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 2 then
            set theBoundz to savedBoundz2
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 1 then
            run script centerWindow
        else if (count of every window) = 0 then
            return
        else if (count of every window) is greater than 6 then
            return
        end if
    end tell

    script centerWindow
        property sidebarWidth : 259
        property theBoundz : missing value
        property theBoundz_1 : {163, 76, 876, 547}
        property theBoundz_2 : {260, 119, 1060, 652}
        property theBoundz_3 : {305, 73, 1126, 812}
        property theBoundz_4 : {353, 122, 1324, 868}
        property theBoundz_5 : {466, 201, 1467, 1129}

        property displayRezolution_Lowest : {0, 0, 1024, 640}
        property displayRezolution_Lower : {0, 0, 1280, 800}
        property displayRezolution_Default : {0, 0, 1440, 900}
        property displayRezolution_Higher : {0, 0, 1680, 1050}
        property displayRezolution_Highest : {0, 0, 1920, 1200}

        tell application "Finder" to set getRez to get bounds of window of desktop

        if displayRezolution_Lowest is equal to getRez then
            centerFinderWindow(theBoundz_1)
        end if
        if displayRezolution_Lower is equal to getRez then
            centerFinderWindow(theBoundz_2)
        end if
        if displayRezolution_Default is equal to getRez then
            centerFinderWindow(theBoundz_3)
        end if
        if displayRezolution_Higher is equal to getRez then
            centerFinderWindow(theBoundz_4)
        end if
        if displayRezolution_Highest is equal to getRez then
            centerFinderWindow(theBoundz_5)
        end if

        on centerFinderWindow(theBoundz)
            tell application "Finder"
                try
                    tell its Finder windows
                        set its current view to column view
                        set its bounds to theBoundz
                        delay 0.1
                        set its sidebar width to sidebarWidth
                        delay 0.1
                        set its toolbar visible to true
                        delay 0.1
                    end tell
                    tell its Finder windows
                        set its sidebar width to sidebarWidth
                    end tell
                end try
            end tell
        end centerFinderWindow
    end script
end script

script displayRezolutionLower
    property savedBoundz6 : {{438, 410, 879, 800}, {0, 22, 437, 409}, {438, 22, 879, 409}, ¬
        {1, 410, 437, 800}, {880, 22, 1280, 409}, {880, 410, 1280, 800}}
    property savedBoundz5 : {{657, 410, 1280, 800}, {0, 22, 437, 409}, ¬
        {438, 22, 879, 409}, {1, 410, 656, 800}, {880, 22, 1280, 409}}
    property savedBoundz4 : {{657, 410, 1280, 800}, {0, 22, 656, 409}, {657, 22, 1280, 409}, ¬
        {1, 410, 656, 800}}
    property savedBoundz3 : {{846, 22, 1280, 800}, {407, 22, 845, 800}, {0, 22, 406, 800}}
    property savedBoundz2 : {{648, 22, 1280, 800}, {0, 22, 647, 800}}

    tell application "Finder"
        if (count of every window) = 6 then
            set theBoundz to savedBoundz6
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 5 then
            set theBoundz to savedBoundz5
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 4 then
            set theBoundz to savedBoundz4
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 3 then
            set theBoundz to savedBoundz3
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 2 then
            set theBoundz to savedBoundz2
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 1 then
            run script centerWindow
        else if (count of every window) = 0 then
            return
        else if (count of every window) is greater than 6 then
            return
        end if
    end tell

    script centerWindow
        property sidebarWidth : 259
        property theBoundz : missing value
        property theBoundz_1 : {163, 76, 876, 547}
        property theBoundz_2 : {260, 119, 1060, 652}
        property theBoundz_3 : {305, 73, 1126, 812}
        property theBoundz_4 : {353, 122, 1324, 868}
        property theBoundz_5 : {466, 201, 1467, 1129}

        property displayRezolution_Lowest : {0, 0, 1024, 640}
        property displayRezolution_Lower : {0, 0, 1280, 800}
        property displayRezolution_Default : {0, 0, 1440, 900}
        property displayRezolution_Higher : {0, 0, 1680, 1050}
        property displayRezolution_Highest : {0, 0, 1920, 1200}

        tell application "Finder" to set getRez to get bounds of window of desktop

        if displayRezolution_Lowest is equal to getRez then
            centerFinderWindow(theBoundz_1)
        end if
        if displayRezolution_Lower is equal to getRez then
            centerFinderWindow(theBoundz_2)
        end if
        if displayRezolution_Default is equal to getRez then
            centerFinderWindow(theBoundz_3)
        end if
        if displayRezolution_Higher is equal to getRez then
            centerFinderWindow(theBoundz_4)
        end if
        if displayRezolution_Highest is equal to getRez then
            centerFinderWindow(theBoundz_5)
        end if

        on centerFinderWindow(theBoundz)
            tell application "Finder"
                try
                    tell its Finder windows
                        set its current view to column view
                        set its bounds to theBoundz
                        delay 0.1
                        set its sidebar width to sidebarWidth
                        delay 0.1
                        set its toolbar visible to true
                        delay 0.1
                    end tell
                    tell its Finder windows
                        set its sidebar width to sidebarWidth
                    end tell
                end try
            end tell
        end centerFinderWindow
    end script
end script

script displayRezolutionDefault
    property savedBoundz6 : {{0, 22, 479, 456}, {480, 22, 959, 456}, {961, 22, 1440, 456}, ¬
        {0, 458, 479, 892}, {480, 457, 959, 891}, {961, 457, 1440, 891}}
    property savedBoundz5 : {{0, 22, 479, 456}, {480, 22, 959, 456}, {961, 22, 1440, 456}, ¬
        {0, 458, 479, 892}, {480, 457, 1440, 891}}
    property savedBoundz4 : {{722, 22, 1440, 456}, {0, 22, 721, 456}, {722, 457, 1440, 900}, ¬
        {0, 458, 721, 900}}
    property savedBoundz3 : {{0, 22, 479, 900}, {480, 22, 959, 900}, {961, 22, 1453, 900}}
    property savedBoundz2 : {{0, 22, 715, 900}, {716, 22, 1438, 900}}

    tell application "Finder"
        if (count of every window) = 6 then
            set theBoundz to savedBoundz6
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 5 then
            set theBoundz to savedBoundz5
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 4 then
            set theBoundz to savedBoundz4
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 3 then
            set theBoundz to savedBoundz3
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 2 then
            set theBoundz to savedBoundz2
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 1 then
            run script centerWindow
        else if (count of every window) = 0 then
            return
        else if (count of every window) is greater than 6 then
            return
        end if
    end tell

    script centerWindow
        property sidebarWidth : 259
        property theBoundz : missing value
        property theBoundz_1 : {163, 76, 876, 547}
        property theBoundz_2 : {260, 119, 1060, 652}
        property theBoundz_3 : {305, 73, 1126, 812}
        property theBoundz_4 : {353, 122, 1324, 868}
        property theBoundz_5 : {466, 201, 1467, 1129}

        property displayRezolution_Lowest : {0, 0, 1024, 640}
        property displayRezolution_Lower : {0, 0, 1280, 800}
        property displayRezolution_Default : {0, 0, 1440, 900}
        property displayRezolution_Higher : {0, 0, 1680, 1050}
        property displayRezolution_Highest : {0, 0, 1920, 1200}

        tell application "Finder" to set getRez to get bounds of window of desktop

        if displayRezolution_Lowest is equal to getRez then
            centerFinderWindow(theBoundz_1)
        end if
        if displayRezolution_Lower is equal to getRez then
            centerFinderWindow(theBoundz_2)
        end if
        if displayRezolution_Default is equal to getRez then
            centerFinderWindow(theBoundz_3)
        end if
        if displayRezolution_Higher is equal to getRez then
            centerFinderWindow(theBoundz_4)
        end if
        if displayRezolution_Highest is equal to getRez then
            centerFinderWindow(theBoundz_5)
        end if

        on centerFinderWindow(theBoundz)
            tell application "Finder"
                try
                    tell its Finder windows
                        set its current view to column view
                        set its bounds to theBoundz
                        delay 0.1
                        set its sidebar width to sidebarWidth
                        delay 0.1
                        set its toolbar visible to true
                        delay 0.1
                    end tell
                    tell its Finder windows
                        set its sidebar width to sidebarWidth
                    end tell
                end try
            end tell
        end centerFinderWindow
    end script
end script

script displayRezolutionHigher
    property savedBoundz6 : {{560, 530, 1120, 1050}, {1121, 22, 1680, 529}, {0, 22, 559, 529}, ¬
        {0, 530, 559, 1050}, {1121, 530, 1680, 1050}, {560, 22, 1119, 529}}
    property savedBoundz5 : {{560, 530, 1120, 1050}, {829, 22, 1680, 529}, {0, 22, 828, 529}, ¬
        {0, 530, 559, 1050}, {1121, 530, 1680, 1050}}
    property savedBoundz4 : {{829, 530, 1680, 1050}, {829, 22, 1680, 529}, {0, 22, 828, 529}, ¬
        {0, 530, 828, 1050}}
    property savedBoundz3 : {{1130, 22, 1680, 1050}, {0, 22, 551, 1050}, {552, 22, 1129, 1050}}
    property savedBoundz2 : {{834, 22, 1680, 1050}, {0, 22, 832, 1050}}

    tell application "Finder"
        if (count of every window) = 6 then
            set theBoundz to savedBoundz6
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 5 then
            set theBoundz to savedBoundz5
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 4 then
            set theBoundz to savedBoundz4
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 3 then
            set theBoundz to savedBoundz3
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 2 then
            set theBoundz to savedBoundz2
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 1 then
            run script centerWindow
        else if (count of every window) = 0 then
            return
        else if (count of every window) is greater than 6 then
            return
        end if
    end tell

    script centerWindow
        property sidebarWidth : 259
        property theBoundz : missing value
        property theBoundz_1 : {163, 76, 876, 547}
        property theBoundz_2 : {260, 119, 1060, 652}
        property theBoundz_3 : {305, 73, 1126, 812}
        property theBoundz_4 : {353, 122, 1324, 868}
        property theBoundz_5 : {466, 201, 1467, 1129}

        property displayRezolution_Lowest : {0, 0, 1024, 640}
        property displayRezolution_Lower : {0, 0, 1280, 800}
        property displayRezolution_Default : {0, 0, 1440, 900}
        property displayRezolution_Higher : {0, 0, 1680, 1050}
        property displayRezolution_Highest : {0, 0, 1920, 1200}

        tell application "Finder" to set getRez to get bounds of window of desktop

        if displayRezolution_Lowest is equal to getRez then
            centerFinderWindow(theBoundz_1)
        end if
        if displayRezolution_Lower is equal to getRez then
            centerFinderWindow(theBoundz_2)
        end if
        if displayRezolution_Default is equal to getRez then
            centerFinderWindow(theBoundz_3)
        end if
        if displayRezolution_Higher is equal to getRez then
            centerFinderWindow(theBoundz_4)
        end if
        if displayRezolution_Highest is equal to getRez then
            centerFinderWindow(theBoundz_5)
        end if

        on centerFinderWindow(theBoundz)
            tell application "Finder"
                try
                    tell its Finder windows
                        set its current view to column view
                        set its bounds to theBoundz
                        delay 0.1
                        set its sidebar width to sidebarWidth
                        delay 0.1
                        set its toolbar visible to true
                        delay 0.1
                    end tell
                    tell its Finder windows
                        set its sidebar width to sidebarWidth
                    end tell
                end try
            end tell
        end centerFinderWindow
    end script
end script

script displayRezolutionHighest
    property savedBoundz6 : {{1277, 22, 1920, 602}, {0, 22, 632, 602}, {1277, 603, 1920, 1200}, ¬
        {0, 603, 632, 1200}, {633, 603, 1276, 1200}, {633, 22, 1276, 602}}
    property savedBoundz5 : {{961, 22, 1920, 602}, {0, 22, 960, 602}, {1277, 603, 1920, 1200}, ¬
        {0, 603, 632, 1200}, {633, 603, 1276, 1200}}
    property savedBoundz4 : {{961, 22, 1920, 602}, {0, 22, 960, 602}, {961, 603, 1920, 1200}, ¬
        {0, 603, 960, 1200}}
    property savedBoundz3 : {{1277, 22, 1920, 1200}, {0, 22, 632, 1200}, {633, 22, 1276, 1200}}
    property savedBoundz2 : {{938, 22, 1920, 1200}, {0, 22, 937, 1200}}

    tell application "Finder"
        if (count of every window) = 6 then
            set theBoundz to savedBoundz6
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 5 then
            set theBoundz to savedBoundz5
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 4 then
            set theBoundz to savedBoundz4
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 3 then
            set theBoundz to savedBoundz3
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 2 then
            set theBoundz to savedBoundz2
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 1 then
            run script centerWindow
        else if (count of every window) = 0 then
            return
        else if (count of every window) is greater than 6 then
            return
        end if
    end tell

    script centerWindow
        property sidebarWidth : 259
        property theBoundz : missing value
        property theBoundz_1 : {163, 76, 876, 547}
        property theBoundz_2 : {260, 119, 1060, 652}
        property theBoundz_3 : {305, 73, 1126, 812}
        property theBoundz_4 : {353, 122, 1324, 868}
        property theBoundz_5 : {466, 201, 1467, 1129}

        property displayRezolution_Lowest : {0, 0, 1024, 640}
        property displayRezolution_Lower : {0, 0, 1280, 800}
        property displayRezolution_Default : {0, 0, 1440, 900}
        property displayRezolution_Higher : {0, 0, 1680, 1050}
        property displayRezolution_Highest : {0, 0, 1920, 1200}

        tell application "Finder" to set getRez to get bounds of window of desktop

        if displayRezolution_Lowest is equal to getRez then
            centerFinderWindow(theBoundz_1)
        end if
        if displayRezolution_Lower is equal to getRez then
            centerFinderWindow(theBoundz_2)
        end if
        if displayRezolution_Default is equal to getRez then
            centerFinderWindow(theBoundz_3)
        end if
        if displayRezolution_Higher is equal to getRez then
            centerFinderWindow(theBoundz_4)
        end if
        if displayRezolution_Highest is equal to getRez then
            centerFinderWindow(theBoundz_5)
        end if

        on centerFinderWindow(theBoundz)
            tell application "Finder"
                try
                    tell its Finder windows
                        set its current view to column view
                        set its bounds to theBoundz
                        delay 0.1
                        set its sidebar width to sidebarWidth
                        delay 0.1
                        set its toolbar visible to true
                        delay 0.1
                    end tell
                    tell its Finder windows
                        set its sidebar width to sidebarWidth
                    end tell
                end try
            end tell
        end centerFinderWindow
    end script
end script

Asegúrese de establecer los valores de propiedad en las resoluciones de pantalla disponibles de su monitor, en la parte superior de la secuencia de comandos

Para establecer el tamaño y las ubicaciones (Límites) de las ventanas del Finder, coloque manualmente y el tamaño (con el mouse) en cada ventana del buscador. Luego, en el Editor de secuencias de comandos, ejecute el siguiente código y luego simplemente copie las coordenadas del resultado y vuelva a pegarlas en la secuencia de comandos principal

tell application "Finder" to set getRezolution to get bounds of window of desktop
tell application "Finder" to set theCount to count of every Finder window
tell application "Finder" to set theBoundz to bounds of every Finder window

AquíhayunejemploqueejecutaelservicioAutomator(quepuedeserinvocadoporunatajodeteclado)enelFinder,comenzandoconseisventanas,luegohastaunaventana...

    
respondido por el wch1zpink 14.07.2018 - 08:54
0

Para las personas que se preguntan qué ha agregado Apple mientras tanto: puede ordenar lograr un resultado similar con la función Ventana dividida : enlace

Excepto que:

  1. Se limita a dos ventanas
  2. Las ventanas son de dos aplicaciones diferentes
  3. Las aplicaciones se ponen en modo de pantalla completa

De todos modos, Apple está tratando de hacer algo al respecto, incluso si están reinventando la rueda en lugar de ver lo que otros proveedores de software de escritorio están haciendo a este respecto.

    
respondido por el mvreijn 06.12.2018 - 11:19

Lea otras preguntas en las etiquetas