Control output/input of audio on system with AppleScript ??

Hi,

As I’m using skype with an headset plugged in usb on my system, I wanted to be able through an AppleScript to automatically switch input and output of audio of Mac OSX to headset when I phone, and then come back after to my default settings. But I’m unable to find somewhere which command to use in AppleScript to modify input and output audio settings of Mac OSX from AppleScript ?

Any ideas ? Tips ?

Thanks in advance

Vincèn

Model: Powerbook 17" with Tiger, Isight, Ipod, Cinema 23’ HD
AppleScript: Tiger version
Browser: Safari 412
Operating System: Other

believe it or not, in one line-

set volume 1 the volume level, from 0 (silent) to 7 (full volume)

turn your volume up loud and then run this line in a Script Editor window. You’ll get the picture.

Is Skype’s application scriptable? #1 question to ask… If so you may be able to write a script that opens the program with additional parameters. It looks like a souped up Yahoo Messenger. Also, what program controls the USB driver?
SC

In fact currently Skype scriptability is nearly zero :frowning: That’s why I want to write an AppleScript I might add in my Script Menu of OSX to be able to switch by myself input and output audio setup of OSX when Skype rings, without need to go in Parameters of OSX each time to setup sound input and output audio !

Thanks for your help

Vincèn

Model: Powerbook 17" with Tiger, Isight, Ipod, Cinema 23’ HD
AppleScript: Tiger version
Browser: Safari 412
Operating System: Other

I think I misexplained myself as I don’t want to control level of audio, but what source device is used for audio input and output in OSX ! I want to be able just by activating an AppleScript to switch easily both audio in and out to my usb device, and when my phone call on skype is finished, to call an other AppleScript to switch back audio out to speakers, and audio in to my iSight !

Thanks

Vincèn

Hello,

I am looking for that also, but with a BT headset (Plantronics Voyager 510). My BT headset is used mostly with my wired telephone line with the L510SL system.

I use my BT headset to listen to music. I would like to find a fast way to pickup the line when it ring on my wired phone system. Is there a way to achieve that objective by scripting the SYSTEM PREFERENCES panel ???

Thanks in advance.

Robert Lespérance

Hi,

it’s not necessary to do this with a script, because Skype
provides its own Audio Input / Output settings in the Preferences,
which are independent from system settings

Hi vincen

This should get you to the right fields and windows in the "input"sound panel of system prefs.
you will after add a few bits to get to the “output” tab
i have only 2 inputs {“internal mic”,“Line In”} and 1 output {“internal speakers”} so can only test this so much
however it should be easy enough for you to add or remove bits that you need.
hope this helps!

tell application "System Preferences"
	activate
	set current pane to pane id "com.apple.preference.sound"
end tell
tell application "System Events"
	tell process "System Preferences"
		set frontmost to true
		--get properties of UI element of tab group of window "Sound"
		click radio button "input" of tab group of window "Sound"
		tell row 2 of table 1 of scroll area 1 of tab group 1 of window "Sound" to set selected to true
	end tell
end tell

cheers

Hi all,

Wanted to know there’s been any progress on creating a script to do this? I have the script above to make these changes in Apple system preference pane. But not sure how to translate it to the Skype preferences (see image below).

Is there a way to figure out the zones in the Skype preference pane, like is done in the AppleScript for the system preferences pane?

Thanks so much for any info on this.

PCMacGuy

Browser: Firefox 21.0
Operating System: Mac OS X (10.8)