Photolithography has been a major enabling tool for miniaturisation of silicon devices that underpinned the electronics revolution. Rapid, high-resolution patterning of key material characteristics would, similarly, accelerate the advent of molecular electronics and photonics. Here we advance a versatile approach employing local diffusion of functional small-molecular compounds through a solution-processed 'molecular gate' interlayer. Diffusion is activated using laser light or solvent vapour jets-a process that can be finely modulated down to molecule-on-demand deposition precision with almost photolithographic resolution (<5 μm) and speeds (3 mm s-1). Examples of principal pattern types are presented including molecular conformation for integrated photonics; chain orientation for polarised security features and micro-engineered electronics; and doping with local conductivity values >3 S cm-1 for improved electronic devices. Finally, we demonstrate the unique capability for one-step patterning of multiple functionalities by spatially modulating composition in ternary blends, leading to locally tunable photoluminescence from blue to red.