Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #SingleInstance, Force
- #MaxHotkeysPerInterval 2000
- F13::LAlt
- F14::<^>! ;AltGr
- F15::LCtrl
- F16::LShift
- F17::LWin
- F18::PrintScreen
- <!<^<+Q::Process, Close, nvstreamer.exe ;LAlt+LCtrl+LShift+Q to close stream.
- ;Your monitor resolutions. (Needed for moving windows between screens in the script below)
- leftMonitorWidth = 1920
- leftMonitorHeight = 1080
- rightMonitorWidth = 1920
- rightMonitorHeight = 1080
- <!<+P:: ; LAlt + LShift + P
- activeWindow := WinActive("A")
- if activeWindow = 0
- {
- return
- }
- WinGet, minMax, MinMax, ahk_id %activeWindow%
- if minMax = 1
- {
- WinRestore, ahk_id %activeWindow%
- }
- WinGetPos, x, y, width, height, ahk_id %activeWindow%
- if x < 0
- {
- xScale := rightMonitorWidth / leftMonitorWidth
- yScale := rightMonitorHeight / leftMonitorHeight
- x := leftMonitorWidth + x
- newX := x * xScale
- newY := y * yScale
- newWidth := width * xScale
- newHeight := height * yScale
- }
- else
- {
- xScale := leftMonitorWidth / rightMonitorWidth
- yScale := leftMonitorHeight / rightMonitorHeight
- newX := x * xScale
- newY := y * yScale
- newWidth := width * xScale
- newHeight := height * yScale
- newX := newX - leftMonitorWidth
- }
- WinMove, ahk_id %activeWindow%, , %newX%, %newY%, %newWidth%, %newHeight%
- if minMax = 1
- {
- WinMaximize, ahk_id %activeWindow%
- }
- WinActivate ahk_id %activeWindow% ;Needed - otherwise another window may overlap it
- return
- OnExit, Terminate
- Terminate:
- Process, Close, nvstreamer.exe
- #Persistent ; For demonstration purposes, keep the script running if the user chooses "No".
- KeyList := "CapsLock|Space|Tab|Enter|Esc|Backspace|ScrollLock|Delete|Insert|Home|End|PgUp|PgDn|Up|Down|Left|Right|Numpad0|Numpad1|Numpad2|Numpad3|Numpad4|Numpad5|Numpad6|Numpad7|Numpad9|NumpadDot|NumLock|NumpadDiv|NumpadMult|NumpadAdd|NumpadSub|NumpadEnter|F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12|F13|F14|F15|F16|F17|F18|F19|F20|F21|F22|F23|F24|LWin|RWin|Win|LControl|RControl|Control|LAlt|RAlt|Alt|<^>!|LShift|RShift|Shift|PrintScreen|a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z|æ|ø|å|1|2|3|4|5|6|7|8|9|0" ; and so on
- Loop, Parse, KeyList, |
- {
- If GetKeystate(A_Loopfield, "P")
- Send % "{" A_Loopfield " Up}"
- }
- ExitApp
Advertisement
Add Comment
Please, Sign In to add comment