FroZen_X Posted February 6, 2015 Share Posted February 6, 2015 Hi, im using Alfred since Dezember last year and its just awesome I got now the Remote app and find it quite useful as i can invoke workflows easily with it. However do i have a thing i cannot get to work. I'm everyday in Skype calls and use workflows to call, message and mute in Skype. What is missing, is to be able to increase and decrease the Volume of Skype itself. I already have a Remote action, to decrease and increase the System Volume but cannot do it for Skype itself. Skype has a key command to invoke the volume up/down of conversations which is: Command+Alt+Up/Down. My Question now is, does anyone know how to take action or send a command to Skype to do this via Alfred(Apple script) ? Like this: tell application "Skype" if (send command "GET MUTE" script name "MuteToggler") is equal to "MUTE ON" then send command "SET MUTE OFF" script name "MuteToggler" else send command "SET MUTE ON" script name "MuteToggler" end if end tell Thanks Link to comment
dfay Posted February 6, 2015 Share Posted February 6, 2015 this works: tell application "System Events" tell process "Skype" set frontmost to true -- raise volume -- change the following to key code 125 to lower volume key code 126 using {command down, option down} end tell end tell Link to comment
FroZen_X Posted February 6, 2015 Author Share Posted February 6, 2015 I tried something similar before but didn't get it to work, but this just works awesome Thank you very much I already included it in Alfred remote. Link to comment
FroZen_X Posted February 6, 2015 Author Share Posted February 6, 2015 (edited) I just tried it now with a game on :/ when im in a game then it doesn't work anymore like my sound changing and Itunes action everything works just that doesn't D: Is there maybe a way to make it work, even when you are in a game ? The Mute for Skype does work in game mmhh Edited February 6, 2015 by FroZen_X Link to comment
dfay Posted February 7, 2015 Share Posted February 7, 2015 (edited) The game is probably blocking system events somehow. Are the other commands making use of AppleScript system events? I can see that the Skype mute one doesn't & I'm pretty sure that the iTunes stuff also can be done in AppleScript without using system events. But Skype doesn't expose volume to AppleScript so you need to use system events there. Edited February 7, 2015 by dfay Link to comment
FroZen_X Posted February 7, 2015 Author Share Posted February 7, 2015 Damn :/ well thank you for you help. Maybe Skype includes volume commands in the future. How did you find out that Skype doesn't expose volume to Applescript ? Like that you can't use a command like the "Mute" ? I was trying to find out commands for it but idk how (except google, which didn't show me a list or so). This would be also useful to know for other Apps in the future. Link to comment
dfay Posted February 7, 2015 Share Posted February 7, 2015 If you open Script Editor then open the Dictionary for Skype, the only command there is send v : Send command string to Skype API send command text : command string I couldn't find any current info. on the Skype API -- what there was suggests that it's being phased out, see e.g. https://scribie.com/blog/tag/skype-desktop-api/ in favor of Skype URIs which as documented here: https://msdn.microsoft.com/en-us/library/office/dn745878.aspx don't expose volume. Link to comment
FroZen_X Posted February 7, 2015 Author Share Posted February 7, 2015 Thanks again The commands don't have volume yeah :/ they only have chat/call and so. Maybe its included in the future or maybe another way from which i don't know yet. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now