Photoshop scripting, masks?

thanks for all the help guys, i managed to get some time to take a peek at it today, and played with it a little, and was able to make a JS function that duplicates the layerMask of the active layer to a named layer, so proved it is doable and flexible enough. SO i will soon remake that in my python code, and add some convince functions like haveing it set and restore the activeLayer for me, and having it accept a layer object instead of just a string name.