Simple, use IF/ Else statements. I assume you don't want the motors to act like servos in which case they will rotate continuously. All you have to do is find the POTs limits as well as its center. Errr, if you find it's limits then subtract the highest from the lowest and divide by 2, to get the center. Then you may want to have an offset. Once you find the center, give it some slack.
// say the lowest is 350 and the highest is 650, the difference is 300
// so divide 300 by 2, you get 150.
// then 350 + 150= 500 (center)
//offset, you decide how much dead zone you want, for the center.
// +-10 should be enough.
If( POT1< 490) { // offset(10) - center(500)
...go forward...
}
Else if (POT1 > 510) {
... Go backwards...
}
Else {
... Full stop...
}
Simple.