title: How to select active layer?
body: <p>It appears that in order to resize the layer it has to be selected(from UI perspective) and active from API perspective. Otherwise I get error on any function call that this function is not supported.</p>
  
  <p>So before resizing I do</p>
  
  <pre><code>var a = doc.artLayers.getByName("iPad");
  app.activeDocument.activeLayer = a;
  </code></pre>
  
  <p>This doesn't visually change selected layer hence calling resize function fails after that. The only way to get it work, manually click on layer(any layer), then it works.
  What is the proper way to resize layer without user interaction?</p>