Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #InstallKeybdHook
- #SingleInstance force
- #Persistent
- /*
- Hotkeys:
- Alt-A: make window always on top
- Alt-W: make window less transparent
- Alt-S: make window more transparent
- Alt-X: make window clickthoughable
- Alt-Z: make window under mouse unclickthroughable
- Code by NickFizzer
- */
- ;global UI=1
- OnExit, ExitSub
- Menu, Tray, NoStandard
- Menu, Tray, Add, Restore, RestoreTray
- Menu, Tray, Add,
- Menu, Tray, Add, Donate, Donate
- Menu, Tray, Add,
- Menu, Tray, Add, Exit, ExitSub
- Menu, Tray, Default, Restore
- ; This SHOULD read the value of UI in the config.ini and start visible, or insivisble
- ;IniRead, UI, Config.ini, User Interface, UI
- ;if UI=0
- ; goto RestoreTray
- ;else
- ; goto MinimizeTrayS
- ;Simple GUI Stuff
- Gui -SysMenu
- Gui, +AlwaysOnTop +ToolWindow -Caption
- Gui,Margin, 0, 0
- Gui, Color, 000000
- Gui, Show, x1850 y800 w500 h300, AlwaysOnTop+
- Gui, Font, s28 caqua, Terminal
- WinSet, Transparent, 180, AlwaysOnTop+
- Gui, Add, Text, x10, AlwaysOnTop+ Beta 0.0.1
- Gui, Font, s10 caqua, Terminal
- Gui, Add, Text, x20, By NickFair (Reddit)
- Gui, Add, Text, x44, Nick_Fair (Twitch)
- Gui, Add, Text, x15,
- Gui, Add, Text, x4, Commands:
- Gui, Font, s10 caqua, Terminal
- Gui, Add, Text, x15, Ctrl-Alt-A: Pin The Selected Window on Top
- Gui, Add, Text, x15, Ctrl-Alt-W: Make Window More Transparent
- Gui, Add, Text, x15, Ctrl-Alt-S: Make Window Less Transparent
- Gui, Add, Text, x15, Ctrl-Alt-X: Enable Click-through on Window
- Gui, Add, Text, x15, Ctrl-Alt-Z: Disable Click-through on Window
- Gui, Add, Text, x15,
- Gui, Add, Text, x15,
- Gui, Add, Text, x30, Ctrl-Alt-Q: Hide/Show UI Ctrl-Alt-C: Close AOT+
- Gui, Add, Text, x15,
- Gui, Add, Text, w40 h20 Border Center yCenter GuiMove, Move
- Gui, Add, Text, w40 h20 Border Center yCenter gGuiClose, X
- Gui, Show, AutoSize
- Return
- uiMove:
- PostMessage, 0xA1, 2,,, A
- Return
- ;UI Toggle Hotkey
- ;!Q::
- ;Show_UI:=!Show_UI=1
- ;return
- ;BETA UI TOGGLE
- ;^!Q::
- ;UI:=!UI
- ;if UI=1
- ; gui, show, NoActivate
- ;else
- ; gui, hide
- ;return
- ^!Q::
- ;UI:=!UI
- if UI=1
- goto RestoreTray
- else
- goto MinimizeTray
- return
- /*Quick Exit Script
- */
- ^!c::ExitApp
- return
- Donate:
- Run https://streamelements.com/nick_fair/tip
- return
- MinimizeTray:
- Critical
- Gui, Hide
- Menu, Tray, Icon
- IniWrite, 1, Config.ini, User Interface, UI
- TrayTip, AOT+ Minimized, Double Click Icon to Restore, 32
- Sleep 3000 ; Let it display for 3 seconds.
- HideTrayTip()
- Return
- MinimizeTrayS:
- Critical
- Gui, Hide
- Menu, Tray, Icon
- IniWrite, 1, Config.ini, User Interface, UI
- Return
- RestoreTray:
- Critical
- ; Enable to disable app icon while
- ; Menu, Tray, NoIcon
- Gui, Show,
- IniWrite, 0, Config.ini, User Interface, UI
- Return
- ;;On Close, App will save UI config to ini
- GuiClose:
- ExitSub:
- IniWrite, %UI%, Config.ini, User Interface, UI
- ExitApp
- return
- HideTrayTip() {
- TrayTip
- if SubStr(A_OSVersion,1,3) = "10." {
- Menu Tray, NoIcon
- Sleep 200
- Menu Tray, Icon
- }
- }
- ;ALWAYS ON TOP BASIC FUNCTIONALITY
- ^!a::
- WinGet, currentWindow, ID, A
- WinGet, ExStyle, ExStyle, ahk_id %currentWindow%
- if (ExStyle & 0x8) ; 0x8 is WS_EX_TOPMOST.
- {
- Winset, AlwaysOnTop, off, ahk_id %currentWindow%
- SplashImage,, x0 y0 b fs12, AOT OFF
- Sleep, 1500
- SplashImage, Off
- }
- else
- {
- WinSet, AlwaysOnTop, on, ahk_id %currentWindow%
- SplashImage,,x0 y0 b fs12, AOT ON
- Sleep, 1500
- SplashImage, Off
- }
- return
- ^!w::
- WinGet, currentWindow, ID, A
- if not (%currentWindow%)
- {
- %currentWindow% := 255
- }
- if (%currentWindow% != 255)
- {
- %currentWindow% += 5
- WinSet, Transparent, % %currentWindow%, ahk_id %currentWindow%
- }
- SplashImage,,w100 x0 y0 b fs12, % %currentWindow%
- SetTimer, TurnOffSI, 1000, On
- Return
- ^!s::
- SplashImage, Off
- WinGet, currentWindow, ID, A
- if not (%currentWindow%)
- {
- %currentWindow% := 255
- }
- if (%currentWindow% != 5)
- {
- %currentWindow% -= 5
- WinSet, Transparent, % %currentWindow%, ahk_id %currentWindow%
- }
- SplashImage,, w100 x0 y0 b fs12, % %currentWindow%
- SetTimer, TurnOffSI, 1000, On
- Return
- ^!x::
- WinGet, currentWindow, ID, A
- WinSet, ExStyle, +0x80020, ahk_id %currentWindow%
- return
- ^!z::
- MouseGetPos,,, MouseWin ; Gets the unique ID of the window under the mouse
- WinSet, ExStyle, -0x80020, ahk_id %currentWindow%
- Return
- TurnOffSI:
- SplashImage, off
- SetTimer, TurnOffSI, 1000, Off
- Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement