Advertisement
mgis90

winrar_license_close.ahk

Jul 28th, 2016
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;winrar_license_close.ahk
  2. ; Closing license window popping up from winrar
  3. ; As all of my scripts this works best on AHK_L version.
  4. ; Please enter correct values for Your system in the variables: w_path, w_title, w_text
  5. #Persistent
  6. #SingleInstance force
  7. Menu, Tray, NoStandard
  8. Menu, Tray, DeleteAll
  9. Menu, Tray, Add, Pro Action, proactiontoggle
  10. Menu, Tray, Default, Pro Action
  11. Menu, Tray, Add
  12. Menu, Tray, Standard
  13.  
  14. w_title:="Kup licencję!"
  15. ;w_class:="#32770"
  16. w_text:="WinRAR nie jest darmowym programem"
  17. w_path:="ENTER HERE PATH TO YOUR PROGRAM FILES\WinRAR\WinRAR.exe"
  18. proaction:=true         ;set this to opposite of what you want at startup
  19. GoSub, proactiontoggle
  20. SetTitleMatchMode 2
  21. SetTimer, smth, -500
  22. SetTimer, closetip, -6000
  23. TrayTip,,Jesli wyskoczy okno Kup licencje! z WinRara wcisne w nim Esc
  24. SoundPlay,DISK:\Team Fortress 2\tf\sound\vo\engineer_specialcompleted06.wav,wait
  25. return              ; koniec auto-execute section
  26.  
  27. smth:
  28. SetTimer, smth, off
  29. if proaction
  30. {
  31.     WinWait,%w_title%, %w_text%
  32.     WinActivate
  33. } else
  34.     WinWaitActive,%w_title%, %w_text%
  35. Send, {Esc}
  36. traytip,,Zamknięte
  37. SoundPlay,DISK:\Team Fortress 2\tf\sound\vo\engineer_specialcompleted08.wav,wait
  38. Menu, Tray, Icon, %w_path%,1
  39. SetTimer, closetip, -2000
  40. SetTimer, smth, -2000
  41. return ;end of smth
  42.  
  43. closetip:
  44. SetTimer, closetip, Off
  45. tooltip
  46. traytip
  47. Menu, Tray, Icon, %w_path%,2
  48. return
  49.  
  50. proactiontoggle:
  51. proaction:=not proaction
  52. if proaction
  53. {
  54.     Menu, Tray, Check, Pro Action
  55.     TrayTip,, Now closing window if anywhere found!
  56. } else {
  57.     Menu, Tray, Uncheck, Pro Action
  58.     TrayTip,, Closing window if active
  59. }
  60. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement