Jump to content

Saez

Member
  • Posts

    27
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Saez

  1. Now I got it. I will check if it's solve my wishes. Thank you so much @vitor
  2. Oh, sorry @vitor. I understand that wasn't possible that's why I reacted sad haha. My point is: Natively, I mean by blocks on workflow, Alfred can't switch an input or output sound device in Apple Preferences > Sound. Right? Also, it's impossible to Mute or Unmute "natively" the microphone of mac, only the speakers. Right. To solve the "problem" of microphone I found on the web how to mute and unmute microphone by AppleScript and I created this workflow: https://github.com/gustavosaez/Mute-UnMute-Microphone---Alfred-Workflow Simple, easy, and just press control+option+command+M and I put the microphone to zero and if I press the same keys combination the microphone volume goes to 70% (I define the numbers on applescript). I duplicate this workflow and named IO-Sound because that's what I want to change. As I show you in the screenshot, the process will be the same: control+option+command+I run an AppleScript (or any other script that make it happens) and a Notification confirms that my Input and Output devices were changed to X and Y. Precisely I want to find a way to: When I press control+option+command+I my Output goes to "S43ZSCLQ30" (My bluetooth earphone) and Input goes to my "Shure MV51" (my professional microphone) And when I press control+option+command+I again the script switch de devices to MacBook Air Speakers/Microphone built-in. I don't know if I was clearly now. If not, please, tell me how can I explain better.
  3. Hey Guys, I had an idea but I need help from people who knows AppleScript. Today we have a common scenario of people working from home and sometimes need to change the input or output from a device to another. In my case, when I go record a podcast (as a guest) or joining to a meeting I need to manually set Output to "S43ZSCLQ30" (My bluetooth earphone) and Input to my "Shure MV51" (my professional microphone). Every time I need to manually do this. My point is: I know it's possible to automate this by a Hotkey or even setting a Word > Enter because I already did that with this Workflow on GitHub. Today my point is the ability to set a word or hotkey and the action will be: set S43ZSCLQ30 as Output set Shure MV51 as Input and when press the hotkey (or word) again both back to MacBook Air Speakers/Microphone (meaning I have the job done). I found some AppleScripts on the web but I don't have much knowledge to understand the code to make it works. Somebody can help? Below some codes I got it. https://apple.stackexchange.com/questions/217148/using-apple-script-to-manage-sound-output-selection tell application "System Preferences" to activate tell application "System Events" get properties tell process "System Preferences" click menu item "Sound" of menu "View" of menu bar 1 delay 2 set theRows to every row of table 1 of scroll area 1 of ¬ tab group 1 of window "sound" set theOutputs to {} as list repeat with aRow in theRows copy (value of text field 1 of aRow as text) to the end of theOutputs end repeat tell application "Finder" activate set desiredOutput to display dialog ¬ "Choose Sound Output: " buttons theOutputs default button "SoundSticks" end tell repeat with aRow in theRows if (value of text field 1 of aRow as text) is equal to ¬ (button returned of desiredOutput as text) then set selected of aRow to true exit repeat end if end repeat end tell end tell tell application "System Preferences" to quit tell application "System Preferences" to activate tell application "System Events" get properties tell process "System Preferences" click menu item "Sound" of menu "View" of menu bar 1 delay 2 set theRows to every row of table 1 of scroll area 1 of ¬ tab group 1 of window "sound" set theOutputs to {} as list repeat with aRow in theRows if (value of text field 1 of aRow as text) ¬ is equal to "SoundSticks" then set selected of aRow to true exit repeat end if end repeat end tell end tell tell application "System Preferences" to quit
  4. I just found a way using OneUpdater provided by a workflow from @vitor. It's working now
  5. That's a good idea. Maybe some advanced users from here can curate the workflow (like App Store or Shortcuts) and make sure workflows keep updated and functional (inactivating older). This could encourage other users share more and more useful workflows improving productivity with Alfred. Also keep the community more active. Another thing is create ability to voting/review workflow to encourage others to download it. Ability to make creators create more, perhaps creating some system to affiliate or gain some credit to change by discount on upgrade to v5, anything like that. And @dobby007 there is a way to make (with script or python) the workflow check if there is any update and auto-update, the creators just must implement it (I don't know how to do it, but I had some that update when tried to run.
  6. Here works, but command systems takes a little bit stuck and I can't say when it begins. I use a lot "empty trash" and "Eject" and when I type "empt" Alfred stuck for 1-2 seconds (max) Monterey+Alfred 461
  7. I Agree. I want to mean privacy and not protection because mute microphone keeps your privacy ok but not means protection by itself. Just a way to avoid "audio leaking' when entering in a meeting call. I didn't not mean that it protects anything further the privacy of audio.
  8. Easy way to remove paywall and banners from websites. This Workflow run a script on any webpage and remove such annoyances that keeps on the screen like paywall, headers and footers (cookies advertisements, for example). Download | Source
  9. Take controle of your privacy and mute your microfone. This shortcut allow you easily mute/unmute your mic. Download | Source
  10. If you are coming from Windows and used to use "Windows + E" to access the Explorer folder, in macOS you are facing no shortcut for this or need to be on desktop and press 3 keys at the same time to open such folder. So, this simple shortcut opens the Download Folder and the shortcut is "Command + E". Inside the shortcut you can edit to any other folder you prefer. Unfortunately it's not possible to select the 'iCloud Drive' folder, any other else is allowed. Download | Source
  11. Hmmm that's works partially. Music.app recognize the command, open the playlist, connects to the destination but not starts play: the link I'm testing: https://music.apple.com/us/playlist/feeling-confident/pl.76e1b75c52404883bc58972d4ebb2c6f
  12. Unfortunately it's not working. [12:36:51.341] Apple Music - ALPHA[List Filter] Processing complete [12:36:51.341] Apple Music - ALPHA[List Filter] Passing output 'https://music.apple.com/us/playlist/feeling-confident/pl.76e1b75c52404883bc58972d4ebb2c6f' to Open URL [12:36:51.359] Apple Music - ALPHA[Open URL] Processing complete [12:36:51.360] Apple Music - ALPHA[Open URL] Passing output 'https://music.apple.com/us/playlist/feeling-confident/pl.76e1b75c52404883bc58972d4ebb2c6f' to Run Script [12:36:51.559] ERROR: Apple Music - ALPHA[Run Script] /Users/gustavosaez/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/8F6FE6A4-B99D-4DA4-8CAD-45D17ACC7135:42:72: execution error: Music got an error: Can’t make some data into the expected type. (-1700)
  13. Basically the way is like this: Args, means: I thought if there is a way to copy this Arg and make AppleScript read it (get this arg). The way is: 1. Type "amusic" 2. Select what you want to listen 3. Music.app is opened in the page. (stops here and the user needs to click on Play to listen, except for radio stations). I want to update to next steps: 4. Music app is hidden (I found how to do this) 5. Music starts to play without action of user (I'm in trouble of this) After that, I think the way is "automated" to do everything in Alfred.
  14. @vitor @deanishe I though in something like copy Args and AppleScript get "args" (it means the link of playlist) to play. There is a way for that? I never worked with API and don't know how to start (yet).
  15. I'm working on this Alfred Workflow: https://github.com/gustavosaez/Alfred-Workflow-Apple-Music-Playlist And today I'm looking for a day to "automate" the play music in background or hidden (to avoid open the application and click PLAY). I found a way to set the mouse click on a screen position (specific on the play button), but it works only if the app is visible and if the resolution of screen is the same of mine. I search about UI Elements for Music.app and didn't find anything. The problem is: When Alfred opens the chosen link, Music.app take a few seconds to open and load the playlist selected; After this, space/play command is inactive, so I think to create a script that gets the current page and play the playlist in shuffle mode. Any idea? some ideas: tell application "Music" -- tell application "System Events" to tell process "Music" to click at {620, 374} play current playlist end tell tell application "Music" -- tell application "System Events" to tell process "Music" to click at {620, 374} play {workflowPlaylistName} end tell tell application "System Events" keystroke "h" using command down end tell
  16. Alfred Workflow - Apple Music Playlist This workflow was based on the information provided by MacStories in this post Tired to check the page everytime I wanted to hear something new and also tired to find something new in a mess of Apple Music App, I imported manually each link and image to here. So, just type "amusic" to see a list or "amusic+type" to select a specific list and choose inside it, for example "amusicplaces". After choose, tap enter and the music app on your mac will be opened at the playlist choosen, just play and enjoy. Feel free to edit and reshare. Check it here https://github.com/gustavosaez/Alfred-Workflow-Apple-Music-Playlist
  17. Forget it friend! I found the error on the log Now, allowed, it worked. Thank you so much!!!
  18. I tried and it's not working on Safari, it works there? I think now it's right, isn't it? (btw, I didn't paid attention on the language before)
  19. I really thank you and I'm keep trying to understand how it works in fact. Look at this site: https://alisdair.mcdiarmid.org/kill-sticky-headers/ That's what this JS do. So, today I have it in my favorite bar and just a tap works fine and I remember Alfred can run JS with a hotkey so I tried again and again and again hahaha (... and still trying)
  20. Take a look. I thought could be so simple but I know it's wrong. https://www.dropbox.com/s/xbx3pr8rze3zb8i/Kill Sticky.alfredworkflow?dl=0
  21. O try to follow it but, I'm sorry, I couldn't get success. Step-by-step I tap to add a new one > Template > Essentials > Keyword to Script. In fact, I will add a hotkey to run on Safari "Control+Option+Command+K" in any website but it's not working.
  22. The link expired. How can I trigger a javascript on Alfred to run it on Safari at the same page? javascript:(function()%7B(function%20()%20%7Bvar%20i%2C%20elements%20%3D%20document.querySelectorAll('body%20*')%3Bfor%20(i%20%3D%200%3B%20i%20%3C%20elements.length%3B%20i%2B%2B)%20%7Bif%20(getComputedStyle(elements%5Bi%5D).position%20%3D%3D%3D%20'fixed')%20%7Belements%5Bi%5D.parentNode.removeChild(elements%5Bi%5D)%3B%7D%7D%7D)()%7D)()
  23. There is not a way to make DuckDuckGo default search engine and disable the results Google/Amazon/Wikipedia?
×
×
  • Create New...