Go to content Go to navigation

Today I was reading some news and came across with the new Google Talk service: chatback.

"Do you have a blog, online profile, or some other personal web page? Would you like to communicate more with your visitors? Today we're launching a new Google Talk feature that lets visitors to your web site chat with you. We call it "chatback" because instead of you doing all the talking on your blog, your visitors can talk back to you. Sure, they could leave comments, but those are public and hard to use for a real conversation. With chatback, it's a real instant message session."

I thought it was a really good idea and started implementing it on this site right away, so that my future clients could reach me quicker on a first approach.
The problem is that there's no control over who uses it, since the code is universal (it's really just an iframe). Everyone can copy/paste your code and use it on whichever site they like. Worst case scenario: spamming bots all over the place.

Google could implement an API system, like they did with Google Maps, and something a bit safer than an iframe.

A good alternative is the flash-driven widget meebo me, completely customizable and way safer.

One thing I hate about Photoshop is the lack of a Save All option. It might well be the only thing I hate about it, really.

Picture yourself coming from a photo-shooting session, you have 4GB of RAW files to edit. Would you also want to save one by one? Think not.

So, as we all know, Photoshop is a great application and compensates that supporting event-based scripts in several languages (Javascript, VBScript and AppleScript). These scripts will tell Photoshop what to do, automatically. You just have to press the button.

I've searched around and found this interesting topic on kirupa.com

For the sake of this article I'll post the code for the Save All action:

var tempFolder = new Folder ("C:/Your_Temporary_Folder")
tempFolder.create();
var DL = documents.length;
for(a=1;a<=DL;a++){
activeDocument = documents[a-1];
var AD=activeDocument;
var imgName= AD.name;
imgName = imgName.substr(0, imgName.length -4);
AD.flatten();
saveFile = new File("C:/Your_Temporary_Folder/"+imgName+".jpg");
saveOptions = new JPEGSaveOptions();
saveOptions.embedColorProfile = true;
saveOptions.formatOptions = FormatOptions.STANDARDBASELINE;
saveOptions.matte = MatteType.NONE;
saveOptions.quality = 12;
AD.saveAs(saveFile, saveOptions, true,Extension.LOWERCASE);
}

Save it with a .js extension and open it on Photoshop (Menu File > Scripts). This example saves JPEG files with level 12 compression; you might want to change the output directory, quality or the format itself.
This code was written by mlk (mlkdesign -at -online.fr) with a few changes by me.
You can download the original one here.

You also might want to check other useful scripts:

Kudos to Tab Mix Plus extension for Firefox which allowed me to recover this post :)

Update: mac version was missing, here it is:

var tempFolder = new Folder ("/YOUR_VOLUME_NAME/Users/YOUR_USERNAME/Documents/temp")
tempFolder.create();
var DL = documents.length;
for(a=1;a<=DL;a++){
activeDocument = documents[a-1];
var AD=activeDocument;
var imgName= AD.name;
imgName = imgName.substr(0, imgName.length -4);
AD.flatten();
saveFile = new File("/YOUR_VOLUME_NAME/Users/YOUR_USERNAME/Documents/temp"+imgName+".jpg");
saveOptions = new JPEGSaveOptions();
saveOptions.embedColorProfile = true;
saveOptions.formatOptions = FormatOptions.STANDARDBASELINE;
saveOptions.matte = MatteType.NONE;
saveOptions.quality = 12;
AD.saveAs(saveFile, saveOptions, true,Extension.LOWERCASE);
}

Since keoshi.com opened I've been receiving a considerable amount of spam through the contact form.

The script itself is so basic that I'm not posting it here. This is also the reason why I'm getting all this spam.

I wanted to solve this in the easiest way possible and not using one of those solutions out there.
What I then thought was having a checkbox that only humans could check. Even though spambots can post data (in this case: sending an instruction to check the box) that's very rare, so this would work.

I added this line on my HTML file:

<input type="checkbox" name="noscript" value="true" />

It renders an unchecked checkbox associated with the name noscript, which will be used later.


In the PHP file I made several but small changes.
I've defined the noscript parameter:

$noscript=Trim(stripslashes($_POST['noscript']));

And then added these lines:

if (!$noscript){
print "<meta http-equiv=\"refresh\" content=\"0;URL=/error.html\">";
exit(); }

It analizes if the checkbox is in fact checked. If it isn't it directs to the page error.html and it halts the script (exit(); parameter)

I've now reduced the spam by 100% (for now!). Yay!