Advertisement
Guest User

Untitled

a guest
Dec 5th, 2020
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #Warn
  2.  
  3. OnMessage(0x404, "AHK_NOTIFYICON")
  4.  
  5. Hotkey, F5, Off
  6.  
  7. Gui, Add, Checkbox, vOptCheckBox Checked, enable/disable checkbox
  8. Gui, Add, Button, gExitbutton, Save and Exit
  9. Gui, Show
  10.  
  11. return
  12.  
  13. F5::
  14.     MsgBox, Hi, this is F5
  15. return
  16.  
  17. ExitButton:
  18.    Gui, Submit, Hide
  19.     Hotkey, F5, % (OptCheckBox ? "On" : "Off")
  20.     while (OptCheckBox)
  21.     {
  22.         MsgBox, Hi, this is while
  23.     }
  24. return
  25.  
  26. AHK_NOTIFYICON(wParam, lParam)
  27. {
  28.     if (lParam = 0x202) ; WM_LBUTTONUP
  29.     {
  30.         Gui, Show,, Hotkeys
  31.     }
  32.     else if (lParam = 0x205) ; WM_RBUTTONUP
  33.     {
  34.         Menu, Tray, Show
  35.     }
  36. }
  37.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement