When I opened the script, the Editor asked me to teach it where is the DreamWer app.
I had no way to respond : look on Robert Poland's HardDisk.
tell application "Finder"
set wdw to Finder window 1
select wdw -- in case the window was not selected
-- resize window so changes will hold - first
tell wdw -- get original size (bounds)
set {leftSide, topSide, rightSide, bottomSide} to bounds
set bottomSide to bottomSide + 10 -- add 10 px to bottom
set bounds to {leftSide, topSide, rightSide, bottomSide}
--end tell
-- then Zoom
--tell application "Finder" to tell wdw
set z to zoomed
if not z then
tell application "System Events" to tell (first process whose frontmost is true) to try
click button 2 of window 1
end try
end if
--end tell
--tell application "Finder" to tell wdw
set {leftSide, topSide, rightSide, bottomSide} to bounds -- get original size (bounds)
set xSize to rightSide - leftSide -- width of window
set bottomSide to bottomSide + 10 -- add 10 px to bottom
--end tell
--tell wdw
if (toolbar visible) then
set toolbar visible to false
set toolbarWasVisible to true
end if
end tell -- wdw
-- home scroll bar(s)
tell application "System Events" to tell application process "Finder"
--tell application "Finder" to activate
-- tell application "System Events" to key code 115
tell scroll area 1 of splitter group 1 of window 1 to set value of every scroll bar to 0
end tell -- System Events …
--end tell
tell application "System Events"
set {rightLimit, bottomLimit} to size of scroll area 1 in process "Finder"
if rightLimit > 1680 then set rightLimit to 1680 -- don't do multiple monitors
set rightLimit to rightLimit - 150 -- leave room for desktop icons
end tell -- System Events …
end tell -- Finder
Yvan KOENIG (VALLAURIS, France) dimanche 31 janvier 2010 21:33:03