Latest Tweets:
These automator scripts help to resize windows. The values I picked (20% shrink) and (25% grow) are simply because to recover from a shrink by 20% you have to grow 25%. Interesting side fact!
on run {input, parameters}
tell application "System Events"
set _activeApp to (get name of first process whose frontmost is true) as string
try
tell process _activeApp
set _size to size of window 1
set _width to item 1 of _size
set _height to item 2 of _size
set size of window 1 to {_width * 0.8, _height * 0.8}
end tell
on error
-- Die Silently!
--display dialog "Could not shrink window for " & _activeApp
end try
end tell
return input
end run
on run {input, parameters}
tell application "System Events"
set _activeApp to (get name of first process whose frontmost is true) as string
try
tell process _activeApp
set _size to size of window 1
set _width to item 1 of _size
set _height to item 2 of _size
set size of window 1 to {_width * 1.25, _height * 1.25}
end tell
on error
-- Die Silently
--display dialog "Could not shrink window for " & _activeApp
end try
end tell
return input
end run
Both of these scripts should be installed as services and you need to “Enable access for assistive devices” in the Universal Access preferences.
Both scripts resize the window to be half the screen width and full screen height.
This script positions the window at the far left.
on run {input, parameters}
tell application "Finder"
set _b to bounds of window of desktop
set _width to item 3 of _b
set _height to item 4 of _b
end tell
tell application "System Events"
set _activeApp to (get name of first process whose frontmost is true) as string
try
tell process _activeApp
set position of window 1 to {0, 0}
set size of window 1 to {_width / 2, _height}
end tell
on error
display dialog "Script failed on = " & ActiveApp
end try
end tell
return input
end run
This script positions the window at the far right.
on run {input, parameters}
tell application "Finder"
set _b to bounds of window of desktop
set _width to item 3 of _b
set _height to item 4 of _b
end tell
tell application "System Events"
set _activeApp to (get name of first process whose frontmost is true) as string
try
tell process _activeApp
set position of window 1 to {_width / 2 + 1, 0}
set size of window 1 to {_width / 2, _height}
end tell
on error
display dialog "Script failed on = " & ActiveApp
end try
end tell
return input
end run
This script allows you to archive mail in Mail.app. If you want to archive to something besides “Archive” for non-gmail accounts you should edit the set mailbox to “archive” line.
on run {input, parameters}
tell application "Mail"
set _selection to selection
repeat with _msg in _selection
set _mailbox to "Archive"
set _account to account of mailbox of _msg
if server name of _account = "imap.gmail.com" then
set _mailbox to "[Gmail]/All Mail"
end if
--properties of mailbox _mailbox of _account
tell application "Mail"
move _msg to mailbox _mailbox of _account
end tell
--display dialog _mailbox
end repeat
end tell
return input
end run
love reading the new york times on a sunday morning.
i swear it has become such a task to try and acquire my sunday nyt before it gets stolen. thumbs down, thief!