Hi,
Because in OS 10.4.8 The zoom button will not zoom a window to a minimum size unless it has been resized.
I have this script that in response to a iKey shortcut command reduces the frontmost window 2% then clicks the Zoom button. The problem is that if the window has a vertical scroll that is not to the top it will resize only from that point down (Sometimes).
I have been trying to find a command that will set the scroll to the top of the window but haven't any luck.
Any suggestions?
if exists window 1 of application "Finder" then tell application "Finder" to try tell window 1 to select item 1 keystroke chr(1) -- Escape key to deselect selection end try end if
tell application (path to frontmost application as Unicode text) activate tell window 1 set {leftSide, topSide, rightSide, bottomSide} to bounds set x to (rightSide - leftSide) * 0.98 as integer -- get 98% of window size set rightSide to leftSide + x set bounds to {leftSide, topSide, rightSide, bottomSide} end tell
try if not window 1's zoomed then set window 1's zoomed to true on error -- need alternate for finder tell application "System Events" to tell ¬ (first process whose frontmost is true) to try click button 2 of window 1 end try end try end tell
tell application "Finder" to tell window 1 to select {} -- deselect all choices
TIA, |