Get Visa in Thailand


Since I didn’t get into any language course on short notice but want to stay in Taiwan from now until summer … can i go to Taiwan without a Visa now, leave to Thailand before the 30 days expire (a trip there was planed anyway) and get a visitors Visa (2 month) there?
And then in May apply for a students Visa and join the language course in June? I guess I’d have to leave the country for that one more time?

thank you!