Skip to content

Instantly share code, notes, and snippets.

@cmittendorf
Created October 26, 2014 09:44
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cmittendorf/b4c9588de4c2358cbded to your computer and use it in GitHub Desktop.
Save cmittendorf/b4c9588de4c2358cbded to your computer and use it in GitHub Desktop.
If you want to use the new JavaScript for automation on Yosemite, you can display a scripts progress using a scripts Progress object.
Progress.totalUnitCount = 100
Progress.completedUnitCount = 0
Progress.description = "Testing progress"
Progress.additionalDescription = "foobar"
for(i = 0; i < Progress.totalUnitCount; i++) {
Progress.description = "Item " + i + " of " + Progress.totalUnitCount
delay(1)
Progress.completedUnitCount = i
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment