Contact local driving schools. Honda Safety Riding Park (in Chiang Mai, Phuket) come highly recommended, though there are other schools as well. Go through their training course and take the theory test on site. Once you pass you go to the local DLT, present your documents and they will issue the license.
I guess you could get a Non B if you're worried, but I don't think it should be an issue. How long were your previous stays, and were they consecutive?
The normal tourist visa is single entry. You can get the multi entry variant if you want to leave and return. Alternatively, just use 30 day visa waivers.