Advertisement
bullb

Untitled

Aug 16th, 2022
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Autohotkey 0.83 KB | Source Code | 0 0
  1. DrawGui(myGui, "343D46", 0, GuiBlinkTransColor, 22, 10, "343D46")
  2.  
  3. ;; @ Draw GUI 繪製視窗
  4. DrawGui(myGui, BGColor, delay, Func, params*)
  5. {
  6.     myGui.Opt("-Caption +AlwaysOnTop")
  7.     myGui.BackColor := BGColor
  8.  
  9.     if CaretGetPos(&x, &y)
  10.         myGui.Show("AutoSize NA x" x " y" y)
  11.     else
  12.         myGui.Show("AutoSize NA")
  13.  
  14.     Func(params*)
  15.  
  16.     Sleep(delay)
  17.     myGui.Destroy
  18. }
  19.  
  20. GuiBlinkTransColor(count, step, BGcolor)
  21. {
  22.     opacity := count * step
  23.     id_AhkGui := WinGetID("ahk_class AutoHotkeyGUI")
  24.     WinSetTransColor(BGcolor " " opacity, "ahk_id " id_AhkGui)
  25.  
  26.     Loop count
  27.     {
  28.         If GetKeyState("Alt") or GetKeyState("Ctrl") or GetKeyState("RButton", "P")
  29.             Break
  30.  
  31.         opacity -= step
  32.         WinSetTransColor(BGcolor " " opacity, "ahk_id " id_AhkGui)
  33.         Sleep(50)
  34.     }
  35. }
  36.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement