I noticed that AHK2 didn't have any kind of Progress command, so I made one. This class is pretty straight forward. Feel free to post feedback, bugs, etc.
Example is included at the top, just uncomment it.
I'll expand this as I come across other things I want a progress bar to do.
added option for a cancel button: Cancel:1
coder checks obj.abort property for status if cancel has been clicked or not, and then decides how to handle it
moved to github
tested and working on a137
2021/05/29
tested and working on a136
2021/05/08
tested and working on a134
2021/03/08
changed Gui.New() to Gui()
added &VarRef where needed
fixed up example to not throw error on repeated button clicks
fixed up __Delete() to automatically run this.close(), and removed this.__Delete() from this.close()
changed .Title() to .SetTitle()
2021/01/21
Added range and title parameters to .Update() method.
Now you can update the range and title of the progress bar on the fly, handy for reusing the progress bar to show multiple stages of progress, instead of destroying/recreating the window with each stage. See docs for details.
Added .Range() and .Title() methods for changing the range and the title. See docs for details.
Added property AlwaysOnTop. Specify "AlwaysOnTop:1" in the options string during progess2.New() to enable this mode. Check comments/docs for details.
Removed reactivation
Updated docs.
2020/12/21
simplified / shortened / optimized code
fixed centering on parent window, when parent window is defined
fixed issue where parent window is not re-enabled after calling .close()
2020/08/07
fixed display issue with main text - textbox was improperly sized due to incorrect usage of setting font face/size
Added range and title parameters to .Update() method.
Now you can update the range and title of the progress bar on the fly, handy for reusing the progress bar to show multiple stages of progress, instead of destroying/recreating the window with each stage. See docs for details.
Added .Range() and .Title() methods for changing the range and the title. See docs for details.
Added property AlwaysOnTop. Specify "AlwaysOnTop:1" in the options string during progess2.New() to enable this mode. Check comments/docs for details.
added option for a cancel button: Cancel:1
coder checks obj.abort property for status if cancel has been clicked or not, and then decides how to handle it