Showing posts with label scripting. Show all posts
Showing posts with label scripting. Show all posts

Saturday, February 07, 2009

The Future of the Layers Palette

John Nack, product manager for Photoshop, requests input on ways to improve the interface for managing the increasingly complex variety and number of layers in a typical design PSD. This should sound familiar:



People end up heavily overloading the few tools they've got--layer names, layer visibility, and nesting layers into folders/groups. Naming conventions work up to a point, but they're clumsy and fragile.


The Layers palette is really a simple outliner of visual data right now, and a lot of the ideas Nack proposes have to do with ways to make that outliner better able to respond to the need for a more automated, error-free design pipeline.



It is a quick and anonymous survey so I encourage you to fill it out if you would be affected by these changes. The last time I took an Adobe survey I got a personal follow-up; it seems like maybe they're finally getting on the clue train.

Monday, August 25, 2008

use your memory usage as your iChat status message


This script will let you use your iChat status message to brag to your friends about how much RAM you've got in your Mac -- or more usefully, petition the IT overlords for mercy if you're scratching to disk a little too much.

I have this triggered periodically by Keyboard Maestro, but there are other ways to get it to run every so often. Not too often, or the overlords will have an easy (if specious) excuse for why it's your own fault you're running out of RAM.



Briefly, it runs a "top" shell command and extracts the two most rhetorically significant memory usage figures, and pipes that to iChat.



set myoutput to (do shell script "top -l 1 | perl -pe " & quoted form of "

my ($unwanted, $wanted) = /(.*inactive,)(.*free)/sm;
$_ = $wanted;

")

tell application "iChat"
    set status message to myoutput
end tell

Monday, October 01, 2007

Canadian Signal Word Type Height Calculator

If you're in the business of designing packaging for Consumer Packaged Goods to be sold in Canada, you may have run across the amazingly complicated formula for calculating the size of the word "Caution" as it sits at the bottom of the package, warning the consumer not to drink the Drano, or what have you. The corresponding icons for "poisonous," "contents under pressure," etc. are quite punk rock, I will have to upload those later.

hazard.gif

So, this is the kind of thing you only have to do twice before it's safer and easier to offload the entire calculation off to the computer.

#! usr/bin/perl
# a formula used to calculate size of "signal word" for Cdn cautionary copy.
# Find diameter of a circle with an area equal to 3% of the PDP.
# That's how big any required symbol needs to be.
# The signal word then has to be 1/4 that size.

use Math::Complex;
use constant PI => 4 * atan2(1, 1);
print "enter the X dimension of your PDP in centimeters\n";
my $xDim = (<\STDIN\>);
print "enter the y dimension of your PDP in centimeters\n";
my $yDim = (<\STDIN\>);
my $PDPArea = $xDim * $yDim;
my $SignalWordHeight = (sqrt(($PDPArea * .03)/PI))/2;

printf "the area of the principal display panel is %.3f cm square, and the signal word should be at least %.3f cm high.\n", $PDPArea, $SignalWordHeight;

Update: Had to escape "STDIN" with backslashes for Blogger. Remove before use.