SHOW:
|
|
- or go back to the newest paste.
1 | ;This script requires NirCMD.exe to be installed in the same folder you've saved this autohotkey script to. | |
2 | ;I run it just from the default c:\users\<username>\Documents\AutoHotKey.ahk location | |
3 | ;This is for a Google+ Hangout, but in theory it would work for Skype or any other video call system. | |
4 | ;Just replace googletalkplugin.exe with whatever the exe is of your video call program in MuteVideo and UnmuteVideo. | |
5 | ||
6 | ||
7 | MuteVideo = "%A_ScriptDir%\nircmd.exe" muteappvolume googletalkplugin.exe 1 | |
8 | UnmuteVideo = "%A_ScriptDir%\nircmd.exe" muteappvolume googletalkplugin.exe 0 | |
9 | ||
10 | MuteArtemis = "%A_ScriptDir%\nircmd.exe" muteappvolume Artemis.exe 1 | |
11 | UnmuteArtemis = "%A_ScriptDir%\nircmd.exe" muteappvolume Artemis.exe 0 | |
12 | ||
13 | MuteMic = "%A_ScriptDir%\nircmd.exe" mutesysvolume microphone 1 | |
14 | UnmuteMic = "%A_ScriptDir%\nircmd.exe" mutesysvolume microphone 0 | |
15 | ||
16 | TransparancyActive=0 | |
17 | ||
18 | ||
19 | ;Toggle transparancy by pressing the space bar | |
20 | Space:: | |
21 | ToggleTransparancy() | |
22 | return | |
23 | ||
24 | ||
25 | ||
26 | ||
27 | ||
28 | ||
29 | ;Manually turn Artemis invisible and unmute the microphone by hitting 1 on your keyboard | |
30 | 1:: | |
31 | HailOn() | |
32 | return | |
33 | ||
34 | ||
35 | ;Manually turn Artemis visible again and mute the microphone by hitting 2 on your keyboard | |
36 | 2:: | |
37 | HailOff() | |
38 | return | |
39 | ||
40 | ||
41 | ||
42 | ToggleTransparancy() | |
43 | { | |
44 | ;Toggles the transparancy mode | |
45 | ||
46 | global TransparancyActive | |
47 | if TransparancyActive=0 | |
48 | { | |
49 | TransparancyActive := HailOn() | |
50 | return | |
51 | ||
52 | } | |
53 | else | |
54 | { | |
55 | TransparancyActive := HailOff() | |
56 | return | |
57 | } | |
58 | } | |
59 | ||
60 | ||
61 | HailOn(){ | |
62 | global UnmuteVideo, MuteArtemis, UnmuteMic | |
63 | ;Unmute Chrome & mic, make Artemis invisible | |
64 | WinSet, Style, +0xC00000, Game Window | |
65 | - | WinSet, Transparent, On, Game Window |
65 | + | WinHide, Game Window |
66 | WinSet, Style, -0xC00000, Game Window | |
67 | Run, %UnmuteVideo% | |
68 | Run, %MuteArtemis% | |
69 | Run, %UnmuteMic% | |
70 | return 1 | |
71 | } | |
72 | ||
73 | HailOff(){ | |
74 | global MuteVideo, UnmuteArtemis, MuteMic | |
75 | ;Mute Chrome & mic, bring Artemis back | |
76 | WinSet, Style, +0xC00000, Game Window | |
77 | - | WinSet, Transparent, Off, Game Window |
77 | + | WinShow, Game Window |
78 | WinSet, Style, -0xC00000, Game Window | |
79 | Run, %MuteVideo% | |
80 | Run, %UnmuteArtemis% | |
81 | Run, %MuteMic% | |
82 | return 0 | |
83 | } | |
84 | ||
85 | ||
86 | ;THIS SECTION IS ONLY NEEDED FOR ARTEMIS 1.6 | |
87 | ;It forces a borderless full-screen window when you WinKey+left click (WinKey+right click turns off borderless window). | |
88 | ;Artemis 1.7 has implemented its own full-screen borderless window, and you don't need to do this anymore. | |
89 | ||
90 | #LButton:: | |
91 | Winset, Alwaysontop, On, Game Window | |
92 | Gui -Caption +ToolWindow | |
93 | WinSet, Style, -0xC00000, Game Window | |
94 | WinMove, Game Window, , 0, 0 | |
95 | return | |
96 | ||
97 | ||
98 | #RButton:: | |
99 | WinSet, Style, +0xC00000, Game Window | |
100 | ;Winset, Alwaysontop, Off, Game Window | |
101 | WinMove, 0, 0 | |
102 | return |