Photoshop Script (HELP NEEDED)

I’m by far no Javascript guru, so I am having trouble modifying a script from PS7 Scripting area, located here:

http://www.kirupa.com/motiongraphics/scripting6_2.htm

I am trying to change:

  1. “PNG” save option to “TIFF”
  2. remove the numbers that are added to the saved file name.

Example: I exported my layered psd file with this script as is and got files like this:

(23)_wireremove005.png
(24)_wireremove004.png

and so on. I’m trying to get it like this…

wireremove004.tiff
wireremove005.tiff

Everything else is fine for me. I’ve narrowed down the section of code that contain these options, but lack the JS knowledge to make it work. Any help would be appreciated. Thanks.