How were elements and molecular formulæ determined in the old days?
First thing, they couldn't tell elements and compounds apart. See Dalton's list of elements with their symbols.



Lime is right there--and it's not actually an element. Neither is Baryte(s). Soda and Potash probably refer to the oxides of Sodium and potassium, though terminology may have been different back then.



In those days, elements were things that could not be synthesized by addition reactions. If you have a reaction $\ce{A + B -&gt;C}$, then $\ce{C}$ is a compound (can't say much about the other two). Alternatively, if the substance can be decomposed (via anaerobic heating/etc), then it's a compound.

Most probably they would stuff things into the list "innocent until proven guilty" (I don't know about this).



Molecular mass can be determined by osmotic pressure, ebullioscopy, Cryoscopy, etc. (Usually stuff delendant on colligative properties)

Determination of molecular formula is much harder.

For organic compounds, it can be done by burning in a controlled environment. The ratios of oxides produced lets us know the relative quantities of all elements but oxygen. The quantity of oxygen can be determined by finding the decrease in Oxygen content of the chamber, and subtracting it from the Oxygen content of the oxides. The molecular formula can be found if you use the emperical formula and determine molecular mass.

For inorganic compounds, they probably had various tests for ions/etc (like the silver nitrate test for halides). They also had flame tests (and the borax bead test), which could help identify certain ions. I'm not too sure here, though.