Re: Is it me or is Finder scripting broken?

John Stewart

Thanks Chris, that’s mostly a winner, at least I can now get and set the property. Hopefully I can eventually get the Finder to respond to the changes. For now I’ll just abort the script and set the preference manually.


On November 26, 2017 at 8:46:19 PM, Christopher Stone (listmeister@...) wrote:

On 11/26/2017, at 17:09, John Stewart <psamech@...> wrote:
I’m looking at the desktop not just any random Finder window.  I have a script that cleans my desktop by moving file/icons around, it won’t work if the Desktop isn’t set to snap top grid.

Hey John,

Try this:

# Auth: Christopher Stone
# dCre: 2017/11/26 19:40
# dMod: 2017/11/26 19:44
# Appl: Finder
# Task: Get Arrangement of Window of Desktop
# Libs: None
# Osax: None
# Tags: @ccstone, @Applescript, @Script, @Finder, @Arrangement, @Window, @Desktop

tell application "Finder"
    tell desktop
        tell its window
            if its current view = icon view then
                tell its icon view options
                    its arrangement
                end tell
            end if
        end tell
    end tell
end tell


Best Regards,

Join to automatically receive all group messages.