Jump to content

Remote Key「Unlock Mac with Alfred Remote」


Recommended Posts

  • 7 months later...

I tried to modify this workflow to support keychain but to no avail since it seem support has been deprecated for terminal keychain access in Yosemite.  Instead I made this change to read from a field that is only accessible by me so that the password is not directly stored in the Alfred Workflow which is in my Dropbox.  It is stored in a local home directory which is hidden and only I have access to the file and directory.  A little more secure I guess

 

on alfred_script(q)

tell application "System Events"
do shell script "caffeinate -u -t 1"
key code 123
delay 0.5
-- Set the string in the file macpassfile
set myfile to ("Macintosh HD:Users:mdivince:mydirectory:macpassfile")
set passwd to (read file myfile)
keystroke passwd
delay 1
keystroke return
end tell
end alfred_script
Link to comment

 

I tried to modify this workflow to support keychain but to no avail since it seem support has been deprecated for terminal keychain access in Yosemite.  Instead I made this change to read from a field that is only accessible by me so that the password is not directly stored in the Alfred Workflow which is in my Dropbox.  It is stored in a local home directory which is hidden and only I have access to the file and directory.  A little more secure I guess

 

on alfred_script(q)

tell application "System Events"
do shell script "caffeinate -u -t 1"
key code 123
delay 0.5
-- Set the string in the file macpassfile
set myfile to ("Macintosh HD:Users:mdivince:mydirectory:macpassfile")
set passwd to (read file myfile)
keystroke passwd
delay 1
keystroke return
end tell
end alfred_script

 

 

You can still access the keychain in Yosemite (and El Capitan), and this workflow seems to be doing just that in the second line of the AppleScript as it uses the `security` command from the terminal, which is the command to interact with the keychain.

Link to comment

Thx I had read that it was not supported anymore but his seems to work.  I had to modify it and use the original post where this was probably taken from since the AS only works if your password has no special character.  I did the parsing like the original post suggested in a bash script that called Ruby which i have no knowledge of  

Edited by mikedvzo
Link to comment
  • 2 months later...
  • 5 months later...

Has anyone figured out how to get this or this to work from the lock screen. I've gotten the workflow I linked working just fine from screensaver or sleep but can't figure out how to get it to run from the lock screen.

 

I have my password set in the workflow and my login screen set to default to me as a user with just the password form but no dice as of yet. 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...