Hey matador4925, I'm not great at Applescript but I did find this post:
http://forums.omnigroup.com/showthread.php?t=12810
It may not be exactly what you're looking for, but it could be a good starting point!
(We went ahead and moved this post into the forum where requests like this generally go.)