Photoshop Scripting : Hello World

Being respectful to traditions, let us start with a script for drawing “Hello World” in Photoshop. One can use Javascript or VBScript in windows or Applescript in Mac for photoshop scripting. The following Javascript code will produce a “Hello World” photoshop document.

var originalUnit = preferences.rulerUnits
preferences.rulerUnits = Units.PIXELS

// Create a new document
var docRef = app.documents.add( 300, [...]

Javascript: Getting Current Window Dimension

Javascript function to get current window height and width. Works with most of the browsers.
// function to get the current width of the window
function getWidth(){
var x = 0;
if (self.innerHeight){
x = self.innerWidth;
}else if (document.documentElement && document.documentElement.clientHeight){
x = document.documentElement.clientWidth;
}else if (document.body){
x = document.body.clientWidth;
}
return x;
}

// function [...]

Timer in Android ( The Better Way )

The usual Timer class is available in Android, but unless you are doing non-trivial stuff, its better to use Handler for scheduling task. Why? Well, Timer class introduces a new thread and while developing mobile application, you should really think twice (or more than that!) before using it.
So, how jobs can be scheduled using [...]

Facebook developer fund comes back

Facebook is announcing developer fund once again! Submission deadline is April 20. Any idea?
http://developers.facebook.com/news.php?blog=1&story=216