Something I found strange while I was using this method to Sketch Pursuit. I had my Ramparados (with Pursuit) out in the lead, encountered a Ditto, used Pursuit, and the Ditto used Transform. I then switched to my Smeargle, and the opposing Ditto(Ramparados now) used Pursuit on my way out. However, when I proceeded to use Sketch, it copied Transform instead of Pursuit, even though that was the move the Ditto used last.Online battles will not work.
You are better off with doing any of the following:
1. use pokeradar for a wild ditto and have it transform into any pokemon in your party that only knows that move.
2. in-game double battle where you sketch the other pokemon's move in your party so long as the sketch is performed after target pokemon makes its move.