altryne Posted January 28, 2015 Share Posted January 28, 2015 Great! If you like, you could change the code for the mute button with: if output muted of (get volume settings) is true then set volume without output muted else set volume with output muted end if Then you don't need two buttons for Mute/Unmute. You can tap the same button for both functions. Also you can change the background color in the same green tone. I thought about having a toggle, and came to a conclusion that it's going to be weird. I'l explain. I really wanted alfred remote, for the situations where I'm in my bed already, and then I hear notifications from the mac, and I don't want to get up and mute it. So I mad this workflow. The problem with having a mute toggle, is that you don't have feedback, and I don't think it's possible to change the icon based on if you're currently muted or not. So potentially, if you mute and unmute, you can get lost and don't know if you are muted currently or not, which you will find out only if another sound comes from the mac. So unless I can somehow change the icons based on the response, I think having two separate buttons for mute/unmute is better(atleast for my case) What do you think? Link to comment
dfay Posted January 28, 2015 Author Share Posted January 28, 2015 That's a good point -- I can envision a lot of scenarios where a toggle would make sense if you have a screen in front of you, but where separate buttons are preferable where the state might be unknown. rice.shawn 1 Link to comment
Andrew Posted January 28, 2015 Share Posted January 28, 2015 I'm definitely going to provide a way to more easily dispatch specific key commands and combos to OS X in a future release of Alfred... this seems really popular Subject22 and dfay 2 Link to comment
stephenmcleod Posted January 30, 2015 Share Posted January 30, 2015 (edited) Here's my Applescript for volume up: on alfred_script() do shell script "afplay /System/Library/Sounds/Pop.aiff" set vol to output volume of (get volume settings) if vol > 90 then # 100 max set volume output volume 100 else set volume output volume (vol + 10) end if end alfred_script and for volume down: on alfred_script() do shell script "afplay /System/Library/Sounds/Pop.aiff" set vol to output volume of (get volume settings) if vol < 10 then # 0 is min set volume output volume 0 else set volume output volume (vol - 10) end if end alfred_script Borrowed the clip sound from a thread somewhere on the web (that I can't find just now) to get some sort of feedback that things have happened. Edited January 30, 2015 by stephenmcleod Link to comment
voidPortal Posted February 15, 2015 Share Posted February 15, 2015 on alfred_script() set step_size_ to 7 set volume_ to output volume of (get volume settings) if volume_ > (100 - step_size_) then set volume output volume 100 else set volume output volume (volume_ + step_size_) end if if output muted of (get volume settings) is true then set volume without output muted end if end alfred_script (And adjust the step size to whatever you want). Do the same thing for Decrease Volume, etc... Thank you! This showed me (newbie as of today with Alfred Remote) exactly what I needed to see to start working with AppleScripts in Alfred Remote. 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