Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
hexandcube committed Jan 28, 2022
0 parents commit ff101ba
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 0 deletions.
63 changes: 63 additions & 0 deletions MicMonitor.ahk
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
Menu, tray, NoStandard
Menu , Tray, Tip, MicMonitor
Menu, tray, Icon, MicMonitor.ico, 1
Menu, tray, Add, Toggle Microphone Monitoring, ToggleMicMonitoring
Menu, tray, Add, About, DisplayAbout
Menu, tray, Add, Exit, EndScript
Menu, Tray, Default, Toggle Microphone Monitoring

something:
return

DisplayAbout() {
Gui, Add, Picture,w80 h80 Center, MicMonitor.ico
Gui, font,bold
Gui, Add, Text, Center x20, MicMonitor by Hexandcube
Gui, font,
Gui, Add, Text,, hexandcube@hexandcube.eu.org
Gui, Add, Text,, https://hexandcube.eu.org
Gui, Add, Text,, Version 1.0
Gui, Add, Text,,
Gui, Add, Text,, Microphone icon by Icons8
Gui, Show, w300 h250 center, About
return
}

ToggleMicMonitoring(){
isExist:=WinExist("ahk_exe rundll32.exe ahk_class #32770")
Run, % "rundll32.exe shell32.dll,Control_RunDLL mmsys.cpl,,recording",,, uPID
WinWait, % "ahk_pid"uPID,, 1

WinWait,Sound

Send {CTRL DOWN}{Down}{CTRL UP}

ControlGet, List, List,, SysListView321, % "ahk_pid"uPID

FileRead, OutputVar, toggle.ini

Loop, Parse, List, `n
{
IfInString, A_LoopField, %OutputVar%
{
ControlClick,&Properties
Send {CTRL DOWN}{Tab}{CTRL UP}
Send {Space}
Send {Enter}
break
}
else
{
ControlSend,SysListView321,{Down}
}
}

WinWait,Sound
Send {Esc}
}

EndScript:

ExitApp

Return
Binary file added MicMonitor.ico
Binary file not shown.
1 change: 1 addition & 0 deletions toggle.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Microphone

0 comments on commit ff101ba

Please sign in to comment.