On Sat, Mar 27, 2010 at 19:20, list boy <[email protected]> wrote:
> I've been wondering if there weren't a way to have an Applescript
> periodically run that would "reinstate" customized window views/settings.
You can easily create an AppleScript which applies settings to a
window, optionally opening one or more windows first. The problem
with doing this periodically is that it's not very quick. With very
many (every?!) folders it would be very slow. The .DS_Store format is
unfortunately not documented so a program that directly modified these
files would require quite a bit of work. It wouldn't be impossible to
reverse engineer (I've done a bit of tinkering myself), but it would
never be guaranteed to remain functional across OS updates.
The script I use for my windows.
set mLeft to 0
set mTop to 44
set wWidth to 714
set wHeight to 377
tell application "Finder"
set theWindow to front window
set toolbar visible of theWindow to false
set current view of theWindow to column view
set {wLeft, wTop, wRight, wBottom} to get bounds of theWindow
if wLeft < mLeft then
set wLeft to mLeft
end if
if wTop < mTop then
set wTop to mTop
end if
set wRight to (wLeft + wWidth)
set wBottom to (wTop + wHeight)
set bounds of theWindow to {wLeft, wTop, wRight, wBottom}
-- cycling the toolbar was necessary to work around a Finder
-- bug circa Tiger that didn't properly store window settings
-- when they changed , I'm not sure if it's still necessary or
-- adequate to solve this issue
--set toolbar visible of theWindow to true
--set toolbar visible of theWindow to false
end tell
--
arno s hautala /-| [email protected]
pgp eabb6fe6 d47c500f b2458f5d a7cc7abb f81c4e00
_______________________________________________
MacOSX-talk mailing list
[email protected]
http://www.omnigroup.com/mailman/listinfo/macosx-talk