Jump to content

Search the Community

Showing results for tags 'toggle sound'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Alfred 3
  • Make the Most of Alfred
    • Discussion & Help
    • Bug Reports
    • Alfred Feature Suggestions
    • Themes
  • Alfred Workflows
    • Share your Workflows
    • Workflow Help & Questions
  • Alfred v2 Themes
  • Alfred Remote for iOS
    • Alfred Remote Discussion & Help
    • Remote Connection Troubleshooting

Categories

  • Articles
    • Forum Integration
    • Frontpage
  • Pages
  • Miscellaneous
    • Databases
    • Templates
    • Media

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Twitter


Website URL


Jabber


Location


Interests

Found 1 result

  1. Hello everyone, here is my first post on this forum. I know there is some other similar posts on the forum... I've read them... but they don't do exactly what I'm looking for. Let me explain myself clearly and you will understand : I have an "old" applescript which toggle the sound output on a press of a hotkey (F7) between 2 different outputs : my display's speakers or my headset. As a result it also send a notification to Growl saying something like "Sound output changed to...". Here is the actual AppleScript : tell application "System Preferences" activate set current pane to pane "com.apple.preference.sound" end tell tell application "System Events" tell application process "System Preferences" tell tab group 1 of window "Son" click radio button "Sortie" if (selected of row 2 of table 1 of scroll area 1) then set selected of row 3 of table 1 of scroll area 1 to true set deviceselected to "HEADSET" else set selected of row 2 of table 1 of scroll area 1 to true set deviceselected to "MAC" end if end tell end tell end tell tell application "System Preferences" to quit tell application "Growl" set the allNotificationsList to {"Sound Notification"} set the enabledNotificationsList to {"Sound Notification"} register as application "Toggle Sound Output" all notifications allNotificationsList default notifications enabledNotificationsList icon of application "System Events" notify with name "Sound Notification" title "Audio Output" description deviceselected application name "Toggle Sound Output" end tell This script worked well in Alfred 1 as a "trigger" but today I'm a proud new owner of the great Alfred V2 and I'd like to directly integrate this script into a Workflow. And here starts my problems : - I can integrate the script to activate after the press of an hotkey... but I'm unable to output a notification center visual result or - I can output a notification center result but without any {query} (of course) so without any usefull information. I tried some of the workflows I've found on your nice forum (Next Audio Output Device...) but what they do is that they ask me to type "o u t p u t"... then to use my keyboard or mouse to choose which sound output I want. It's "long" ! I'd like to press my hotkey and "boum" automatically switch from headsets to display's speakers and vice-versa ! As you understood at this point, I define myself as "noob" concerning scripting/programming. I usually succeed to get my solution by copying/pasting parts of codes from different scripts... Alfred is so cool I'd like to have more learning about that, that's also the reason I post here :-) Sorry for the long message. Hope someone would give me some solution. Thanks
×
×
  • Create New...