(+ 1) I agree
Not changing it to this would get flagged at code review stage in an enterprise environment.
Furthermore you can increase the code quality by removing the magic numbers such as:
getWidgetChild(270, 15) and sleep(500,1000)
Imagine how hard it would be to maintain a large script if those widget numbers changed. At a minimum you could wrap the getWdigetChild in a method which describes the widget you are getting and reuse that. For the sleep put the 500,1000 into variables such as minSleep and maxSleep.
Examples:
int maxSleep = 1000;
int minSleep = 500;
private WidgetChild getCookWidget() {
Widgets.getWidgetChild(270, 15);
}
private void exampleMethodWithSleep() {
//code
Sleep(minSleep, maxSleep);
//code
}
Also if you find the need to add comments, generally in 90% of cases, your code isn't readable and therefore can be improved so you don't need comments.