Thanks for posting a script but, when you make claims like a script being "smart" or that it will "make your work easier", you really need to include some more information in your description especially since your code is mostly undocumented as to how it's "smart" or will "make your work easier".