scripting beyond the FInder

I am having trouble scripting any application besides the Finder – I can’t get much of a clear answer from the documentation or the dictionaries on correct syntax for some of the app specific commands.

My latest attempt has been to script the Appearance Control Panel (supposed to be scriptable, and has a dictionary). The problem is, for example, when I want to get the current theme, is it

tell application “Appearance” to get its current theme


tell application “Appearance” to get the current theme of its frontmost window

or maybe

tell application “Appearance” to get the current theme of the desktop

or something completely different? Usually when I even try to get the “current theme” at all, the Script Editor tries to read it as two identifiers in a row. I’m having trouble figuring out just which of the many possible objects I’m supposed to be targeting when, for example, I want to change the current desktop theme from AppleScript.

(hopefully this post isn’t as confusing as my problem has been) :rolleyes:

Maybe this will work. It should provide a reference to the current theme.

tell application "Appearance"
  set currTheme to current theme
end tell

If you want just the name, this might work:

tell application "Appearance"
  set currThemeName to name of current theme
end tell

display dialog currThemeName