You'll need to re-index them most probably, the way I do it is...
1, Shift to top gear (small rear cog, big front cog)
2, Undo clamp and release shifter cable, no need to take it off, just ensure any tension is off it
3, The two screws you were messing with are the high and low limit screws. Bit by bit turn the high limit screw until the chain is at the point where it is going to comes off to the frame side, it may even come off. Once at that point go back a half to a full turn until the chain is quietly settled on the small rear cog.
4, This bit is trial and error, it may take a few goes; pull any slack out of the cable and do up the pinch nut then check the the indexing of the gears obviouly by spinning the pedals. Don't go right up to the big cog as you still need to set the low limit screw. But go up and down the gears to see if everything is as it should be. There are two things to do if it isn't, either loosen the cable or apply more tension. Always adjust the cable when on the small rear cog. It should take you no more than a few goes but make sure when each gear is selected it runs smooth and quiet with the chain not trying to skip to the adjacent cog.
5, Once happy with the shifting on the smaller cogs, change the front cog to the small(est) one. Then carefully shift to the big rear cog , if it won't go, undo the low limit screw bit by bit until it does, if the chain falls off into the spokes turn the limit screw bit by bit until it doesn't.
Be logical and methodical and you should have it done in less than half an hour. If you think it has all gone wrong, go back to step one and work through again. It really isn't that difficult once you get a feel of what is going on when you turn the limit screws. The base cable tension is the tricky trial and error bit. Don't graunch the cable clamp bolt up each time you need to adjust, just a nip sufficient to secure the cable and then a 1/4 turn as you don't want to crush and ruin the cable.
You can do it !