We use Monte Carlo simulations of a Lennard-Jones fluid adsorbed on a short-range planar wall substrate to study the fluctuations in the thickness of the wetting layer, and we get a quantitative and consistent characterization of their mesoscopic Hamiltonian, H [ξ ]. We have observed important finite-size effects, which were hampering the analysis of previous results obtained with smaller systems. The results presented here support an appealing simple functional form for H[ξ ], close but not exactly equal to the theoretical nonlocal proposal made on the basis a generic density-functional analysis by Parry and coworkers. We have analyzed systems under different wetting conditions, as a proof of principle for a method that provides a quantitative bridge between the molecular interactions and the phenomenology of wetting films at mesoscopic scales.