title: Sikuli: How to prompt programatically to capture a region and save it as png in cwd
body: <p>Instead of providing beforehand all the images as png to find UI elements on screen, I want to have an option for user to capture the region first time the program is run. For example, when program starts, I want user to provide image for button that fires a command and then from next time onwards, I will use that image to find that element and no user input is needed.</p>
  <p>So basically, there is one user setup step which will capture all UI elements in the form of png images.</p>
  <p>So question is - how to invoke region capture and wait for user to provide the region preferably by dragging and dropping mouse. At the end of this prompt, I should get a png which I will use in subsequent region.find calls. There is &quot;Take screenshot&quot; available in sikuli IDE. Is it exposed programatically? Also, I am working on Windows.</p>