If someone ever need to do it too, here is what I do to get the datas about the towns, thanks to the Console.
Update: combine steps 2, 3 and 4 into:
and to get the industries:
1) select the script thread
3) open the stdout.text, copy the answer
I then get, for example:
I haven't been able to get the Towns' IDs in an array that can be used right away. Hopefully I'll learn how to code it properly.
Next I'm gonna try to have that in a mod and have it save the datas in a txt file.
Thanks a lot eis_os for that awesome tool!