I've found that using a hot air paint stripper works.
Use the concentrating nozzle and a low to medium setting. Then when the paint is soft use a flat bladed screwdriver to first take the paint off the surface and then from the slot itself.
Once the head is free from paint a further heating of the screw will also help as there will be a differential expansion of the screw and hinge (or whatever the piece is) which helps loosen the screw.
A further trick I don't always remember is that it can help to try to tighten the screw first before removing it. This might just be enough to break the rust/paint/whatever is causing the screw to stick.