While I have no idea about later titles, but in Green/Red/Blue/Yellow, pressing buttons affects the catch chances, but it is the same as random.
What happens when you attempt to catch something is the game will create a random number using a random number generator. This number will be a number from 0-255, or 0-200, and so on based on the ball you choose. (the lower the final number the better chance) Good random number generators use something like a global counter to grab a seed from. Then that random number runs through the rest of the algorithm that accounts for the other pokemon's state (poisoned, asleep, etc), it's catch rate, and some other factors. If that number at the end of the algorithm is low enough, you successfully caught it.
What pressing buttons does is uses CPU cycles, and thus advancing whatever global timer the random number generator might be using to seed the random number.
So pressing buttons does make the outcome different, but there is no way to ensure it is any more favorable than just doing nothing.