scketch in scketch

The OP just wants to combine 2 sketches so that action in the first sketch code causes the incorporated second sketch code to execute.

It is not uncommon to get posts where people are asking how to combine the code from two sketches but it is unusual to get requests for how to CALL one sketch from another.