Hi again, Bob and thanks so much for your reply.
I have experienced a squirrel in the attic, but I set a humane trap, but food in the back and within a short time, I caught the squirrel. I was told to leave the trap there and baited again, as they usually travel in pairs, but we never caught anything in the second trap, so it was removed and the hole where they were getting in was sealed up by a professional.
I found a great article that might help you, and it states that unfortunately, the ultrasound transmitters, mothballs and other techniques people use are ineffective, so, see if this helps, and you might have to get professional help to set up certain types of traps at the points of ingress and egress, to get them out, permanently:
They're not going to leave on their own if they have a nice, warm, cozy 'home' in your attic, so that's why the suggestions at the website above should be helpful.
I hope you start making some progress with this new information!