Select object by modifier and do something in that modifiers sub level?

Hey, I'm trying to write a script, but I cant seem to get this part to work. I want the script to select how ever many objects not hidden in the scene that have a custom named modifier, which was originally an "Edit_Poly" modifier, but renamed to "A-New Name Here ". Then go into that modifier in each object, and create a copy of an existing object in the scene named "attachmetomod" and attatch the copy, leaving the original for the next object with the "A-New Name Here " modifier to create another copy and attatch, looping this until all objects with the modifier "A-New Name Here " have the object named "attachmetomod" attatched to it, then delete the original "attachmetomod" object.

 ---------------MaxScript Used To Create The Modifier------------------

newmod = Edit_Poly()

newmod.name = "A-New Name Here"

if $ != undefined then

(

addModifier $ (newmod) before:1

)

else

(

messageBox "Select Something!"

)

  ---------------MaxScript Used To Create The Modifie------------------