Skip to content

Instantly share code, notes, and snippets.

@NKid
Last active August 19, 2020 10:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NKid/2eafb37aa200eb458e8e to your computer and use it in GitHub Desktop.
Save NKid/2eafb37aa200eb458e8e to your computer and use it in GitHub Desktop.
ProcessBar
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
Process, Priority, , High
Global tmpVal=50
#Right:: OSD(+5)
#Left:: OSD(-5)
OSD(Step)
{
If Round(tmpVal+Step) > 100
tmpVal := 100
Else If Round(tmpVal+Step) < 0
tmpVal := 0
Else
tmpVal := Round(tmpVal + Step)
TrayTipTime(, tmpVal)
Progress, 1:B W600 ZH15 Y620 ZX0 ZY0 CBLime CW161616
Progress, 1:%tmpVal%
SetTimer, OSD_Timer, 500
Return
}
OSD_Timer:
{
SetTimer, OSD_Timer, off
Progress, 1:Off
Return
}
TrayTipTime(Title="", Text="", Time=1500, Style=0)
{
TrayTip, %Title%, %Text%,, %Style%
SetTimer, TrayTipRemove, %Time%
Return
TrayTipRemove:
TrayTip
SetTimer, TrayTipRemove, Off
Return
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment