Jump to content


  • Content Count

  • Joined

  • Last visited

1 Follower

About gingerbeardman

  • Rank

Recent Profile Visitors

723 profile views
  1. My searches should copy the correct link to the clipboard when you press enter, just open that in Safari (or using Alfred) to open iTunes to the correct place. You may be able to bypass Alfred completely using iTunes URL Scheme, but I cannot help you with that. https://stackoverflow.com/questions/31194155/apple-music-url-scheme
  2. OK, here is a test workflow: https://forumfiles.com/f8J8K7Sdm2/Safari_TEST_alfredworkflow Further checking shows it works OK when called by keyword, but fails by keyboard shortcut? Script Editor works when I invoke using the play button.
  3. Well, the example was just that. It will not work in circumstances where the layout of the Safari toolbar is different, which I suspect is the case for you? But I'll confirm the OP and post more details when I can.
  4. The following AppleScript runs just fine in Script Editor (it clicks a user extension button of given description) tell application "System Events" tell process "Safari" set extDesc to "Recent Tab List" tell first UI element of last group of last toolbar of first window click (first button where its description = extDesc) end tell end tell end tell ...but nothing happens when I call it from within an Alfred workflow? Using either NSAppleScript or /usr/bin/osascript Errors are: [2019-03-14 11:47:19][ERROR: action.applescript] { NSAppleScriptErrorAppName = "System Events"; NSAppleScriptErrorBriefMessage = "Can\U2019t get toolbar 1 of window 1 of process \"Safari\". Invalid index."; NSAppleScriptErrorMessage = "System Events got an error: Can\U2019t get toolbar 1 of window 1 of process \"Safari\". Invalid index."; NSAppleScriptErrorNumber = "-1719"; NSAppleScriptErrorRange = "NSRange: {194, 57}"; } [2019-03-14 11:47:19][ERROR: action.script] /Users/matt/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Scripts/C0150784-A54F-47EA-B559-C0306F7759D7:186:243: execution error: System Events got an error: Can’t get toolbar 1 of window 1 of process "Safari". Invalid index. (-1719) Any ideas?
  5. Sorry for the late response! Interesting the UI has changed in Mojave. A better way to do it in this instance, that will work in Mojave and earlier, is to say "last group" rather than "group X". I've changed the workflow to do this. Next, I have modified the workflow (same download) to have two keywords: pw = automatically copy first matching password (as it was before) kc = search and display all matches (I often use this) I do not know how to filter search from the search field. One thing that helps is if you set your default column sorts in Keychain before you use this workflow. - click column header "Kind" (arrow points down = descending) this gives me a list with web form passwords at the top, a good match for use with "pw" keyword Another alternative is to create a new set of keychain entries for commonly searched for passwords with unique/shortcut names. Let me know how you get on!
  6. Which of the 6 steps do you get stuck at?
  7. So I finally put together a workaround for this using UI scripting. https://www.gingerbeardman.com/alfred/Search Keychain.alfredworkflow Accept keyword and argument Launch Keychain Access via Alfred Workflow AppleScript focus search box, enter argument, copy password prompt, quit Keychain Access (user enter password and confirm) The core of it is the AppleScript: on alfred_script(q) activate application "Keychain Access" tell application "System Events" tell process "Keychain Access" set value of text field 1 of group 2 of toolbar 1 of window "Keychain Access" to q click button 1 of text field 1 of group 2 of toolbar 1 of window "Keychain Access" click menu item "Copy Password to Clipboard" of menu 1 of menu bar item "Edit" of menu bar 1 end tell end tell quit application "Keychain Access" end alfred_script
  8. Ah, thanks for the info. Shame meanwhile I found this workflow: https://github.com/neilkimmett/keychain-workflow which wraps security find-internet-password -w -s {query} and may be useful to somebody reading this thread.
  9. This is very cool! I have been unable to figure out the scripting to access "Web form password" (Keychain parlance) which is what all the passwords I want to search are stored as. Basically, website passwords. Also, I recently discovered - likely somewhat belatedly - that I can copy the password of a keychain item by selecting its row and using the context menu. No need to open the item, unlock, select text, copy - which is what I have been doing for decades! Oops.
  10. did you ever get anywhere with this? i am currently looking at doing something similar. https://ss64.com/osx/security.html security find-internet-password -a myaccount -s myservice -g ...but all i really need is a way to open keychain access with a predefined search term, however it does not have a URL Scheme of its own.
  11. I'm having trouble populating both the title and text of a notification. Is this possible?
  12. OK @gandalfsaxe a bit more digging and it was possible to do this with minor changes—I just had to find the correct documentation. Let me know if you need to search for anything other than song and album. See above for updated download link!
  13. Sorry I have not had time to look into that.
  14. Sure, the ability to edit the store region is already in the script. 1. Open Alfred 2. Find workflow 3. Right click workflow 4. "Open in Finder" 5. open files song.py and album.py 6. change line COUNTRY = u'GB' to COUNTRY = u'US'
  • Create New...