1

I would like to show the Dock when all windows are hidden/closed/minimized. Is this something that can be done with AppleScript? Where can I learn more about the specific capabilities of AppleScript?

1

[edit after more research]

  1. You can use Applescript to turn on and off the dock's autohide.
  2. You can't use Applescript to determine whether you have open/visible windows. This is because Applescript treats each application as an object, and some applications handle windows differently, meaning they can't all be manipulated or detected. I haven't even been able to find an applescript that can reliably count open windows, and there's absolutely no recent documentation on how to handle spaces with applescript.

From within the Script Editor, select File > Open Dictionary, and you will be presented with a list of applications that have dictionaries of scriptable objects & behaviors that you can access. You want to select System Events and search for "dock". The dock preferences object has the property autohide, which looks like a good bet to do what you want: i.e. turn on autohide when there are open windows, and turn it off when there aren't. You can find more information about what's available by looking through different dictionaries and reading the documentation.

Apple's own introduction

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .