gr8 got a reaction from JJJJ in Can Alfred search the Mac Keychain
Alright, I played with it and changes just minor things, and ended up with a version that works well for me.
Works on Big Sur Keyword ka without a parameter just launches Keychain Access Keyword ka with a parameter will launch Keychain Access and search for the keyword Using the Cmd+Shift modifier will copy the first search result, e.g. similar to the Keychain Access built-in behaviour Using the Cmd modifier will launch Keychain Access. Now that I type this, not sure if needed, I'll probably remove it. I hope it's useful to others.
Have a nice day.
gr8 reacted to gingerbeardman in Can Alfred search the Mac Keychain
So I finally put together a workaround for this using UI scripting.
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
gr8 reacted to thomasv in Can Alfred search the Mac Keychain
@gingerbeardman Thanks for this great workflow, this is exactly what I needed!
Are there any new developments since?
I was looking at your script and have a suggestion which might be less prone to changes in the UI.
You could replace the search/input part:
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"
To something like this, using the menu bar instead:
click menu item "Find" of first menu of menu bar item "Edit" of first menu bar keystroke q
gr8 reacted to CJK in Can Alfred search the Mac Keychain
AppleScript's "KeyChain Access" is pretty terrible. However, the kind bloke(s) at Red-Sweater software (maker of FastScripts) have made a scripting addition aptly referred to as the Usable Keychain Scripting
It allows you to search using whose filters as with other enumerated AppleScript collections, e.g.
tell application "Usable Keychain Scripting" to tell ¬
the current keychain to get the ¬
password of every internet password ¬
whose name contains "google.com"
gr8 reacted to vitor in Send the selected or entered text to Deepl for translation
For reference, it works fine in Alfred 3.
gr8 reacted to vitor in Script works in Script Editor but not in Alfred Workflow
Are you using a Run NSAppleScript? Don’t. Use instead a Run Script with /usr/bin/osascript (AS) as the Language. There are also some unnecessary things in your code (like property theURL : "") and other things could be made shorter. Try this:
tell application "Safari" to set theURL to URL of front document tell application "Google Chrome" if (count of (every window where visible is true)) is greater than 0 then tell front window to make new tab else make new window end if set URL of active tab of front window to theURL activate end tell
gr8 reacted to alfredclough in New Calendar Event Using Quick Entry Option Workflow
This workflow allows you to enter a new event via Alfred using Calendar's quick entry box syntax. Type whatever you would enter in the quick entry box in Calendar in Alfred after the newevent keyword and hit enter. The workflow will pass what you type to Calendar through the Quick entry box allowing Calendar to automatically create the event.
Click here to download the workflow.