Skip to content

Commit

Permalink
[BUGFIX] language support was not complete for speaker count
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasA committed Jul 11, 2014
1 parent c2778ca commit 56066b4
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 31 deletions.
46 changes: 20 additions & 26 deletions sound_switch.ini
Original file line number Diff line number Diff line change
Expand Up @@ -67,34 +67,28 @@ Terminate = ^#q
;Ready

;English
WindowsTitle = Sound
WindowsTab = Playback
DefaultDevice = Default Device
DefaultDeviceAltLetter = d
DefaultCommDevice = Default Communications Device
DefaultCommDeviceAltLetter = c
Ready = Ready
Default = Default

;German
;WindowsTitle = Sound
;WindowsTab = Wiedergabe
;DefaultDevice = Standardgerät
;DefaultDeviceAltLetter = S
;DefaultCommDevice = Standardkommunikationsgerät
;DefaultCommDeviceAltLetter = o
;Ready = Bereit
;Default = Standard
;WindowsTab = Playback
;DefaultDevice = Default Device
;DefaultDeviceAltLetter = d
;DefaultCommDevice = Default Communications Device
;DefaultCommDeviceAltLetter = c
;Ready = Ready
;SpeakerCountTitle = Speaker Setup
;SpeakerCountTextBegin = Select the speaker setup below
;Default = Default

;Danish
;WindowsTitle =
;WindowsTab =
;DefaultDevice =
;DefaultDeviceAltLetter =
;DefaultCommDevice =
;DefaultCommDeviceAltLetter =
;Ready =
;Default =
;German
WindowsTitle = Sound
WindowsTab = Wiedergabe
DefaultDevice = Standardgerät
DefaultDeviceAltLetter = S
DefaultCommDevice = Standardkommunikationsgerät
DefaultCommDeviceAltLetter = o
SpeakerCountTitle = Lautsprecher-Setup
SpeakerCountTextBegin = Wählen Sie die Lautsprechereinrichtung aus,
Ready = Bereit
Default = Standard

;
;_________________
Expand Down
12 changes: 7 additions & 5 deletions soundswitch.au3
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ Global $display_tray_tip = Int(IniRead("sound_switch.ini", "Options", "DisplayTr

Global $title = IniRead("sound_switch.ini", "Strings", "WindowsTitle", "error")
Global $text = IniRead("sound_switch.ini", "Strings", "WindowsTab", "error")
Global $speakerCountTitle = IniRead("sound_switch.ini", "Strings", "SpeakerCountTitle", "error")
Global $speakerCountTextBegin = IniRead("sound_switch.ini", "Strings", "SpeakerCountTextBegin", "error")
Global $default_dev = IniRead("sound_switch.ini", "Strings", "DefaultDevice", "error")
Global $default_dev_alt = IniRead("sound_switch.ini", "Strings", "DefaultDeviceAltLetter", "error")
Global $default_comm = IniRead("sound_switch.ini", "Strings", "DefaultCommDevice", "error")
Expand Down Expand Up @@ -189,16 +191,16 @@ Func SwitchSpeakerCount()
ControlListView($title, $text, $ctrl, "Select", $device)
If ControlCommand($title, $text, "Button1", "IsEnabled") Then
ControlClick($title, $text, "Button1")
WinWait("Speaker Setup", "Select the speaker setup below")
$sel = ControlCommand("Speaker Setup", "Select the speaker setup below", "ListBox1", "GetCurrentSelection")
WinWait($speakerCountTitle, $speakerCountTextBegin)
$sel = ControlCommand($speakerCountTitle, $speakerCountTextBegin, "ListBox1", "GetCurrentSelection")
If $sel == $Set1 Then
$select_this = $Set2
Else
$select_this = $Set1
EndIf
ControlCommand("Speaker Setup", "Select the speaker setup below", "ListBox1", "SelectString", $select_this)
While WinExists("Speaker Setup", "")
ControlClick("Speaker Setup", "", "Button1")
ControlCommand($speakerCountTitle, $speakerCountTextBegin, "ListBox1", "SelectString", $select_this)
While WinExists($speakerCountTitle, "")
ControlClick($speakerCountTitle, "", "Button1")
Sleep(50)
WEnd
EndIf
Expand Down

0 comments on commit 56066b4

Please sign in to comment.