High and Dizzy (1920)
High and Dizzy is a 1920 short comedy film starring Harold Lloyd. The plot revolves around a young woman who sleepwalks and the doctor who is attempting to treat her. The climactic scene involves the young woman sleepwalking precariously on the outside ledge of a tall building, anticipating Lloyd's more famous skyscraper-scaling scenes in Safety Last! A subplot has Lloyd and his friend getting inebriated on homemade liquor and then trying to avoid a prohibition-era policeman who pursues them for being drunk.
More at Wikipedia.