set read_glass_dock to "defaults read com.apple.dock no-glass" set set_glass_dock to "defaults write com.apple.dock no-glass -boolean " set kill_dock to "killall Dock" set is_leopard to my check_for_leopard() set no_glass to false try -- error silently if (do shell script read_glass_dock) > 0 then set no_glass to true end try if no_glass then set toggle_no_glass_value to "NO" else set toggle_no_glass_value to "YES" end if try -- error silently do shell script (set_glass_dock & toggle_no_glass_value) do shell script kill_dock end try on check_for_leopard() set the hexData to system attribute "sysv" set hexString to {} repeat 4 times set hexString to ((hexData mod 16) as string) & hexString set hexData to hexData div 16 end repeat set the OS_version to the hexString as string if OS_version is less than "1050" then error "This script only works under Leopard." end if return true end check_for_leopard