erm...
WindCap = Window Caption
the code OBVIOUSLY uses FindWindow to do its work, checking the window caption, changing this to a filename would be utterly pointless..
if you're coding a trainer, then gettheprocessid from the window (or when you launch it using createprocess), then work from that...
i get the feeling you don't really know what you're doing