It looks like the bitmapData in memory is undefined (should have checked in the code for that too - as it compares to false only). I don't support TexTools myself anymore simply because I don't have the time and the only Max version I have is max 2010. I never tested it with 2012 but some people told me that some features…
I was under the impression this script automatically created your selection mask instead of doing the whole process manually. When I ran it all I got was this error and the programming code opened up....