Advertisement
Guest User

Untitled

a guest
Aug 12th, 2024
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. ; Set up the GUI for the overlay
  2. CustomColor := "EEAA99" ; You can change this to any RGB color
  3. Gui +LastFound +AlwaysOnTop -Caption +ToolWindow
  4. Gui, Color, %CustomColor%
  5. Gui, Font, s12 ; Set a large font size (32-point)
  6. Gui, Add, Text, vMyText cWhite, 5 ; Initial countdown value
  7. WinSet, TransColor, %CustomColor% ; Make the background transparent
  8.  
  9. ; Hotkey to start the countdown
  10. ~E::
  11. IfWinActive, Path of Exile
  12. {
  13. Gui, Show, x1200 y700 NoActivate ; Show the overlay
  14. counter := 5
  15. SetTimer, UpdateOSD, 1000
  16. }
  17. return
  18.  
  19. UpdateOSD:
  20. counter--
  21. if (counter < 0) {
  22. SetTimer, UpdateOSD, Off
  23. GuiControl,, MyText, 5 ; Reset the countdown display
  24. SoundBeep(523, 250, 25) ; Play a beep sound (frequency 750 Hz, duration 300 ms)
  25. Gui, Hide ; Hide the overlay
  26. return
  27. }
  28. GuiControl,, MyText, %counter%
  29. return
  30.  
  31. ; Hide the GUI when Path of Exile is not active
  32. #IfWinNotActive, Path of Exile
  33. Gui, Hide
  34. #IfWinActive
  35.  
  36. ;-------------------------------------------------------------------------------
  37. SoundBeep(Frequency, Duration, Volume) { ; custom wrapper
  38. ;-------------------------------------------------------------------------------
  39. SoundGet, MasterVolume
  40. SoundSet, Volume
  41. SoundBeep, Frequency, Duration
  42. SoundSet, MasterVolume
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement