Thursday, August 28, 2014

#1 2005-05-07 11:32:21 am

vincen
Member
From: Bayonne, France
Registered: 2005-05-07
Posts: 3
Website

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

Offline

 

#2 2005-05-08 01:37:43 am

sitcom
Member
Registered: 2005-03-14
Posts: 367

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

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

Last edited by sitcom (2005-05-08 02:00:02 am)

Offline

 

#3 2005-05-08 01:56:09 am

vincen
Member
From: Bayonne, France
Registered: 2005-05-07
Posts: 3
Website

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

In fact currently Skype scriptability is nearly zero sad 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

Offline

 

#4 2005-05-08 04:23:26 am

vincen
Member
From: Bayonne, France
Registered: 2005-05-07
Posts: 3
Website

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

sitcom wrote:

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.
SC

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

Offline

 

#5 2006-10-25 06:39:13 am

rlesperance
Member
From: Québec, Canada
Registered: 2002-11-19
Posts: 419

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

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

Offline

 

#6 2006-10-25 09:01:05 am

StefanK
Member
From: St. Gallen, Switzerland
Registered: 2006-10-21
Posts: 10490
Website

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

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


regards

Stefan

Offline

 

#7 2006-10-25 10:38:53 am

pidge1
Member
From: Leeds-England-UK
Registered: 2005-08-06
Posts: 626

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

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!

Applescript:

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

Last edited by pidge1 (2006-10-25 10:40:16 am)


pidge

Filed under: System

Offline

 

#8 2013-07-02 11:28:27 am

PCMacGuy
Member
Registered: 2013-07-02
Posts: 1

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

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).

http://www.entrepreneurspathtosuccess.com/images/Skype_sound_Settings.png

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)

Offline

 

Board footer

Powered by FluxBB

[ Generated in 0.048 seconds, 10 queries executed ]

RSS (new topics) RSS (active topics)