Advertisement
mgis90

WindowOnTop.ahk

Feb 1st, 2016
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;WindowOnTop.ahk
  2. ;---------------------------
  3. ; transparency and always on top control
  4. ; for any window (maybe except games etc.)
  5. ;---------------------------
  6. #SingleInstance force
  7. TrayTip, %A_ScriptName%, Hotkeys:`nWin+j - always on top`nWin+k - set transparency`nWin+l - turn off transparency`nWin+m - move window to top left corner,6
  8. trans:=150
  9. return              ; koniec auto-execute section
  10.  
  11. #j::
  12. WinGetTitle, curname, A
  13. WinSet, AlwaysOnTop, Toggle, A
  14. TrayTip, , Always on top toggled for: %curname%,4
  15. return
  16.  
  17. #k::
  18. WinGetTitle, curname, A
  19. WinSet, Transparent, %trans%, A
  20. TrayTip, , Transparency value %trans% set for: %curname%,4
  21. trans:=trans-10
  22. If trans < 15
  23.     trans:=250
  24. return
  25.  
  26. #l::
  27. WinGetTitle, curname, A
  28. WinSet, Transparent, OFF, A
  29. TrayTip, , Transparency turned off for: %curname%,4
  30. return
  31.  
  32. #m::
  33. WinMove, A, , 10, 10
  34. WinGetTitle, Title, A
  35. TrayTip, ,Window "%Title%" moved,4
  36. Title=
  37. return
  38.  
  39. ;---------------------------
  40. ;         do skryptu
  41. ;---------------------------
  42. ; ctrl+ alt+ ...
  43. ; R- reload
  44. ; G- exit
  45.  
  46. ^!r::Reload
  47. ^!g::
  48. MsgBox, 4, %A_ScriptName%, Do you want to exit?, 5
  49. IfMsgBox, Yes, ExitApp
  50. IfMsgBox, Timeout, ExitApp
  51. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement