Skip to content

Tag: javascript

Curved corners script for Photoshop

I’ve been looking for an excuse to play around with scripting in Photoshop. Today I found one. I came across a series of actions that rounded off the corners of an image to get it ready for uploading to a web site. The problem is that it was a series of actions. As in one action for each radii. One for 5px, one for 10px, one for 25px, etc. That’s just screaming to be scripted with a quick prompt asking for a radius.

So that’s what I did. About half an hour and I had a script that would prompt for a radius and then round off whatever image was opened.

Event tracking with JavaScript

A while back Google added event tracking to Analytics so you could keep track of Javascript and Flash events.  Pretty cool feature.

Being the stat junkie that I wanted to use this to keep track of outgoing clicks on a photography forum of mine.  But I didn’t want to have to go through every link prior to displaying the page.  Seemed like a perfect time for a little bit of Javascript. 

JavaScript Error ‘expected identifier, string or number’ in IE

Sometimes you get those errors that just pick at you and you can’t seem to find a solution. It happened to me this morning when testing and reviewing a JavaScript library I’m writing in IE7. FireFox worked without a hitch, but IE threw an ‘expected identifier, string or number’ error pointing to the last line of the variable declaration. Of course it didn’t help that my copy of MS Script Debugger wanted to lock up my computer.

Here’s a very shortened example of the code I was working on.