Jump to content

patgilmour

Member
  • Posts

    62
  • Joined

  • Last visited

Posts posted by patgilmour

  1. On 1/5/2021 at 12:57 PM, getthething said:

    Long dead thread but I'm wondering if anyone has this working on Catalina and Big Sur? Perhaps this is an issue connecting to Airplay speakers but it does work with a different workflow. I would just prefer to be able to use a hotkey to set the output specifically. I get the notification as if it's completed the script but the output source doesn't actually change. I've tried both the packaged workflow that @ssent1 provided as well as the updated script from @morgdaddy

     

    Edit: it also seems to be playing/pausing Apple Music.

     

    The issue is that in Catalina, as far as I can tell, the table divider is considered a "row" so when numerically identifying your output devices you need to take this into consideration and modify the script. For example, if you have two devices, like I do, you toggle between rows 1 and 3, not rows 1 and 2. Try the following and make sure to change the 'deviceselected' to names of your devices.

     

    tell application "System Preferences"
    	reveal anchor "output" of pane id "com.apple.preference.sound"
    end tell
    tell application "System Events" to tell process "System Preferences"
    	tell tab group 1 of window "Sound"
    		click radio button "Output"
    		if (selected of row 1 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 "Gulliver HomePod"
    		else
    			set selected of row 1 of table 1 of scroll area 1 to true
    			set deviceselected to "Internal Speakers"
    		end if
    		
    	end tell
    end tell
    quit application "System Preferences"
    return deviceselected

     

    sound-script.jpg

  2. Thanks for taking the time to reply, @chris! Useful info.

     

    I took a look at the dev docs on Apple. Closest I got to what I needed was here: https://developer.apple.com/documentation/applemusicapi/search_for_catalog_resources

     

    But you're right, the URL schemes (if that's what they are called) are very limited.

     

    I did take a look at the workflow you mention, but my Alfred kludge is closer to what I want so I'll stick with that for now.

  3. Hi,

     

    In Apple Music, I am trying to replicate an Alfred Custom URL search I use to search Spotify's catalog directly in the app (i.e. not in a browser).

     

    The Alfred Spotify Custom Search URL search is: `spotify:search:{query}`

    This will open Spotify in the Mac app and perform the search (screenshot attached).

     

    I've tried various modifications for the Apple Music app, like `music:search:{query}` and `spotify:search:term={query}` and various others that are close to the browser-based search query: `https://music.apple.com/us/search?term=[query-here]`

     

    The above queries starting in 'music...' don't work. The do open Apple Music directly on the Mac and start playing whatever is next in the queue.

     

    Does anyone know of the correct scheme to use to perform the searches in Apple Music via Alfred?

     

    Thanks,

     

    Pat

     

     

     

    spotify working search.jpg

  4. In Snippets I'm able to create a shortcut for today's date or date time 7 days from now with the simple syntax: `{date +7d}` and `{date time +7d}`

    What I'm trying to do however is use the {date:short} snippet in the same way, so: `{date:short +7d}`

    However this outputs: "11 (second: 38)"

    My question: is there any way of using {date:short} with Snippet date arithmetic?

    Thanks! 

  5. Hi,

    A feature I use a lot in Alfred 3 is using Alfred's Search Bar as a scratchpad for quick Snippet expansions that I need to get onto the clipboard. For example, I invite Alfred, type pg` which expands to one of my email address, select all and copy, etc.

    Originally this didn't work in Alfred 3, but after a discussion here (can't find the thread) it was added—and appreciated!

    Unfortunately this feature isn't working in Alfred 4.

    Is there any chance you could add it back in at a future date?

    On a positive note, Alfred 4 looks brilliant. I'm really looking forward to digging in. Congratulations on the great work!

    Thanks,

    Pat

  6. @Vero - that would be very welcome if/when it’s on the table.

     

    Meantime, things will improve each day here as the mass of emails with the same mod date move beyond 3, 7 days mod date etc.

     

    Thanks for your speedy, useful answers—much appreciated!

     

  7. @Vero Thanks! I checked and unfortunately a lot of my older emails have a Mod Date of 12 Jan 2019—must have happened during some iCloud issues I was having over the weekend.

     

    I guess there's no easy way to restrict to creation date only?

     

  8. @Vero - thanks for this flow. Is there any way to get it to sort Mail.app's results returned by creation or modification date? I get a mix of emails near the top that span the last 10 years!

     

    I tried changing the file filter date range to last 30 days, but it doesn't seem to affect the results.

     

    Thanks,

    Pat

     

     

  9. On 9/5/2016 at 0:08 AM, rounak said:

     

    @Carlos-Sz : Nice work! Good demonstration of many ways with which this can be done with Alfred.

     

    @<others> :)

     

    I know its an old thread. But I also came here looking for this and I believe so will others. A simple File Action is what is called for.

    I possess no special workflow skills, but still, I am posting the solution for those who cannot create this workflow:

     

    https://www.dropbox.com/s/55534rd0c5wpxhl/open_save_dialog.alfredworkflow?dl=0

     

    How to use?

    Bring up any file/folder in Alfred

    type your shortuct for action Action

    and run this workflow which is currently named "Send To Open or Save dialog".

     

    I personally believe (and I have nothing against what anyone else's approach is):

    1. Alfred's File Search is neatly organised.

    2. Single quote easily gets me to the folder/file I need to.

    3. There is no need to over-complicate things by adding new keywords and then performing actions to get to the item which you could have easily got to by typing single quote in the first place. The more the keywords, the more the complications (naming pattern, length etc) in using them.

    4. When 2 shall not remain true, then and only then, create Favorites folder, otherwise you are slowing yourself down instead of doing things quickly.

     

     

    Thanks.

    Any chance of a fix to the DropBox link?

     

  10. @deanishe - thanks for taking the time to reply.

     

    I think I wasn't clear (I do know what a symlink is).

     

    What is need to do is display a list of references to files or folders rather than the names of the files or folders, and I want the references to be navigable in Alfred. I also want the list of references to be automatically created by Alfred.

     

    If I use Tags/Keywords for this as you suggest, I can add a tag called "Favorite" or something like that and tag all the files/folders. Then I can get the list of items with these tags in Alfred. Plus the results listed are navigable. The problem is, I want unique references to be returned as the result.

     

    I tried with Spotlight Comments. So, for example, I added "Alias - Script Resources" to the Get Info Comment field. This was cool, as I was able to add a unique reference, but the results returned are still the actual file folder names, and not the Comment references.

     

    With all that in mind, I can think of a way of achieving this, but it does seem convoluted (is there an easier way)?

     

    - Create my unique Mac Aliases

    - Use a Workflow to display them as Results

    - Pass the selected result to AppleScript that resolves the Alias to original (equivalent of Cmd+R)

    - Pass the new path back to Alfred for navigating

     

    Think that's my best option?

     

    Thanks!

     

  11. Thanks @deanishe - I created a symlink but Alfred doesn't seem to have registered it. I type "[SPACE]Alias - Documents" and the Alias doesn't appear in the list of Mac Aliases.

     

    Seems Spotlight doesn't reference symlinks.

     

    Is there perhaps a way in Alfred to get it to show a list of specific folders, preferably with alternative names?

     

  12. When I invoke Alfred, type "Space" + "[Folder Name]" I can then select the folder, and use the right arrow to navigate into it. Nice!

     

    However, I also have Mac aliases on my drive that have easy-to-remember names. I'd like to be able to do the same in Alfred. But when I type "Space" + "[Alias Name]" then use the right arrow, it takes me to the containing folder of the alias and not the content of the aliased folder.

     

    Is there any way to get aliases to replicate the behavior of folders?

     

    Thanks,

     

    Pat

     

     

     

  13. Hi Rob, Thanks for the very useful workflow.

     

    I'm wondering is there any way to add a search that will produce the same results as appear in Ulysses "Last 7 Days" folder, but within the Alfred results window? Or even just sort the sheet results by modification date?

     

    I see there is a 'open-recent' action in the callback documentation you post above, though using it is beyond me except for creating a bookmark of the type:

    ulysses://x-callback-url/open-recent

    Thanks!

     

  14. I'm using a lot of very similar Snippets (email addresses for projects). It would be very useful to be able to right-click on an existing Snippet and "Duplicate" it, so I can tweak the text in a new Snippet.

     

    Also, as I create a lot of Snippets, the ability to create an Alfred shortcut that would take me straight to the Snippets tab would be useful too.

     

    Thanks!

×
×
  • Create New...