alfred-icloud-passwords
alfred-icloud-passwords copied to clipboard
Does not work on MacOS Ventura
I'll get to this when I have a machine running Ventura. I guess since they overhauled the Settings app, my selectors for buttons and inputs don't work anymore.
First, thanks for your work !
I also need it on Ventura.
Can you explain how do you find the selectors and I could modify it to work ?
Hey @robinalexandre,
Thanks for your offer to take a look at this on Ventura! I mostly used Xcode's Accessibility Inspector to figure out the items to use, and did the rest using trial-and-error:
Did some digging and found you can open the password pane using
x-apple.systempreferences:com.apple.Passwords
![image](https://user-images.githubusercontent.com/77747704/190846510-f0d7c1a8-2ae7-4ca7-bb9c-85d70d94bfe0.png)
Yes I agree with you @SoloUnity, but the selectors to search for a specific password are still not working.
Can you have a look on this @leolabs ?
I don't have a machine running Ventura yet but will take a look once I've upgraded.
any update, on configuration on macos ventura?
any update, on configuration on macos ventura?
Not yet, maybe I should try to install Ventura on an external drive since I don't trust it enough to use it as my production OS yet.
Exactly, i don't think it's worth it. for me personally i found it unstable for the time being.
Is there any update to this repo?
I made this script that works on macOS Ventura v 13.0.1, hopefully it works for you @Crushoverride007 @leolabs @robinalexandre @SoloUnity
on run argv
# Open passwords window
do shell script "open x-apple.systempreferences:com.apple.Passwords"
set searchQuery to (item 1 of argv)
tell application "System Events"
set expireDate to (get current date) + 10
repeat until ((window "Passwords" in process "System Settings") exists) or ((current date) > expireDate)
delay 0.1
end repeat
if ((current date) > expireDate) then
error "Find window timeout" number 100
end if
tell window "Passwords" in process "System Settings"
tell group 1 of group 2 of splitter group 1 of group 1
set expireDate to (get current date) + 10
repeat until (first scroll area exists) or ((current date) > expireDate)
delay 0.1
end repeat
if ((current date) > expireDate) then
error "Find element timeout" number 100
end if
tell scroll area 1
set value of first text field of group 3 to searchQuery
end tell
end tell
end tell
end tell
end run
@marcoseiza it still doesn't work, it just opens up the password window. I've a similar script that does the exact same thing
Unfortunately, this doesn't seem to work for me either. It sometimes inserts the search query correctly but the list of passwords doesn't update. Might be an issue with the Settings app, but maybe we can work around that.
Looking forward to Ventura support. following...
Maybe it was because of a new update with Ventura but the script does work for me! Perhaps it hasn't worked consistently for everyone else because of the 10 second timer in the script?
Thanks @marcoseiza , it works on Ventura 13.1. As @leolabs says, it always inserts query correctly, but sometimes the list doesn't update.
Please consider supporting query->copy->exit workflow.
Hoping for a fix soon 🤞🏼
@bradydjohnson try changing my open shell script above to
open x-apple.systempreferences:com.apple.Passwords-Settings.extension
I made this shortcut that gets the current url from your browser, in my case "Microsoft Edge Dev" and searches for it in your passwords. You can retrofit it to whatever your application is.
on run argv
# Open passwords window
do shell script "open x-apple.systempreferences:com.apple.Passwords-Settings.extension"
# set searchQuery to (item 1 of argv)
tell application "System Events"
tell application "Microsoft Edge Dev"
set searchQuery to URL of active tab of front window
end tell
set searchQueryClean to do shell script "echo '" & searchQuery & "' | sed -e 's/^http:\\/\\///g' -e 's/^https:\\/\\///g' | sed 's/\\/.*//g' "
set expireDate to (get current date) + 10
repeat until ((window "Passwords" in process "System Settings") exists) or ((current date) > expireDate)
delay 0.1
end repeat
if ((current date) > expireDate) then
error "Find window timeout" number 100
end if
tell window "Passwords" in process "System Settings"
tell group 1 of group 2 of splitter group 1 of group 1
set expireDate to (get current date) + 10
repeat until (first scroll area exists) or ((current date) > expireDate)
delay 0.1
end repeat
if ((current date) > expireDate) then
error "Find element timeout" number 100
end if
tell scroll area 1
set value of first text field of group 3 to searchQueryClean
end tell
end tell
end tell
end tell
end run
Thank you!
Here's the code for anyone else that sees this
` on run argv # Open passwords window do shell script "open x-apple.systempreferences:com.apple.Passwords-Settings.extension"
set searchQuery to (item 1 of argv)
tell application "System Events"
set expireDate to (get current date) + 10
repeat until ((window "Passwords" in process "System Settings") exists) or ((current date) > expireDate)
delay 0.1
end repeat
if ((current date) > expireDate) then
error "Find window timeout" number 100
end if
tell window "Passwords" in process "System Settings"
tell group 1 of group 2 of splitter group 1 of group 1
set expireDate to (get current date) + 10
repeat until (first scroll area exists) or ((current date) > expireDate)
delay 0.1
end repeat
if ((current date) > expireDate) then
error "Find element timeout" number 100
end if
tell scroll area 1
set value of first text field of group 3 to searchQuery
end tell
end tell
end tell
end tell
end run`
Hey everyone, if anyone is still checking this. It broke for me after another update so I decided to check it out for myself. I messed around with the Xcode accessibility inspector and finally decided why complicate it for myself. My version script just types the query instead of inserting it, hope this helps someone. (Working on Sonoma 14.1)
on run argv
do shell script "open x-apple.systempreferences:com.apple.Passwords"
set searchQuery to (item 1 of argv)
tell application "System Events"
set expireDate to (get current date) + 10
repeat until ((window "Passwords" in process "System Settings") exists) or ((current date) > expireDate)
delay 0.1
end repeat
tell window "Passwords" in process "System Settings"
tell group 1 of group 2 of splitter group 1 of group 1
set expireDate to (get current date) + 10
repeat until (first scroll area exists) or ((current date) > expireDate)
delay 0.1
end repeat
if ((current date) > expireDate) then
error "Find element timeout" number 100
end if
keystroke "a" using command down
keystroke (ASCII character 8) -- ASCII character 8 is the backspace key
keystroke searchQuery
end tell
end tell
end tell
end run
@SoloUnity unfortunately still not working, but can you tell me which version of alfred are you working with,
for the debuggers out there, here's the error i ge when i run the script of @SoloUnity to fetch the password of in this example of instagram.
@Crushoverride007 Using Alfred version 5.14 I have attached my version of the extension in case there is any configuration error. Also Alfred might be finicky with the accessibility settings? I had to turn that off and on in system settings before a previous version of the script worked.
@SoloUnity I got it working as the one i had locally, but gotta that say it doesn't input the query i type it only opens up the passwords window without pasting the query i typed 😏 do you have any idea how to implement that, or is there a bug on the workflow?
Hi, is this working with the current versions? Are there any security concerns?
Would be great if you can check if #9 works for you :)