Skip to content

Commit

Permalink
Create index.md
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkeinecke authored Aug 13, 2018
1 parent 11e85ca commit 49d1674
Showing 1 changed file with 27 additions and 0 deletions.
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.

0 comments on commit 49d1674

Please sign in to comment.