Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by gingerbeardman

  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'
  15. OK, I fixed my workflows for Alfred 3. Search Mac App Store Search App Store Search iTunes Music Store NEW April 2018 Search Apple Music Here they are: http://workupload.com/archive/hfKc87d
  16. I've updated the download for the iTunes Music Search, though it stopped working and I've not revisited it.
  17. I got your new version and you seem to have solved the problem?
  18. pa doesn't work for me but the hotkey does still work. Odd, right? This means the issue on High Sierra is in the open_gui function, which only calls the run_bookmarklet JavaScript. Which got me thinking... why run one line of ruby, to run another line of ruby, to run some JavaScript? Seems overly complicated. So I replaced the ruby script action (which ran open_gui ruby, which ran run_bookmarklet javascript) with an action that runs an osascript JS with the code from run_bookmarklet pasted in directly. Now pa works just fine for me. Feel free to include this change in your workflow. I thought about uploading my modified workflow but settled on these screenshots instead.
  19. I'm also not seeing anything when I do pa debug output: [2017-11-16 12:06:13][input.keyword] Processing output of 'action.script' with arg '' [2017-11-16 12:06:13][action.script] Processing output of 'action.script' with arg '' Interestingly, hotkey trigger does work. I just added this page to pinboard using the hotkey. pa did nothing I'm using Safari 11.0.1 (13604.3.5), macOS 10.13.1 (17B48) Develop "Allow JavaScript" options enabled
  20. I have a hotkey that I am using for a workflow. It's also assigned at Mac OS X system level. My workflow checks if an app is running and then sends some AppleScript. I want to stop the hotkey propagation after Alfred has processed it, so the system does not respond to the hotkey. Is this possible?
  21. Changes to work with latest growl and growlnotify (they're not new, you just need the latest versions of both) What’s on 6music.alfredworkflow Thanks for the help above, only 3 years late with my changes!
  22. Thanks for this! I missed the cog, too. I'm happy to use ⌘, key combo from now on
  23. Hey I've not tested this on El Capitan as far as I can remember. Happy to help where I can, though!
  • Create New...