-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
11e85ca
commit 49d1674
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
...plescript/system-preferences/geraet-fuer-die-tonausgabe-identifizieren/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
title: Gerät für die Tonausgabe identifizieren | ||
--- | ||
|
||
## Gerät für die Tonausgabe identifizieren | ||
|
||
Getestet mit: Mac OS X 10.4.8 und AppleScript 1.10.7 | ||
|
||
Wenn man herausfinden möchte, welches Gerät für die Tonausgabe ausgewählt ist, dann kann man dies wie folgt tun: | ||
|
||
```applescript | ||
tell application "System Preferences" | ||
reveal anchor "output" of pane id ¬ | ||
"com.apple.preference.sound" | ||
end tell | ||
tell application "System Events" | ||
set soundOutputDevice to value of text field 1 of row 1 of table 1 of ¬ | ||
scroll area 1 of tab group 1 of window "Ton" of ¬ | ||
application process "System Preferences" | ||
end tell | ||
quit application "System Preferences" | ||
display dialog soundOutputDevice buttons ("OK") default button 1 | ||
``` | ||
|
||
Dabei muss man beachten, dass der Wert "`Ton`" abhängig von der aktuell eingestellten Sprache für das Betriebssystem ist. Wenn man zum Beispiel Englisch als Systemsprache eingestellt hat, dann muss man den Wert "`Ton`" durch "`Sound`" ersetzen. |