Getting started with 1Password for your growing team, or refining your setup? Our Secured Success quickstart guide is for you.
Forum Discussion
Former Member
2 years ago1Password 8 on Mac does not lock on quit/close
I just updated to v8 on my Mac. Is there a way to have 1password 8 auto lock on quit. I am sure it did this in v7.
At the moment this means if I quit 1password and forget to lock it manually, I c...
Former Member
2 years agoHi Dave,
In the mean time, I am running this AppleScript app with this code.
property appToMonitor : "1Password" -- Replace with the name of the application
-- Function to check if the app is running
on appIsRunning(appName)
tell application "System Events"
set appList to (name of processes)
end tell
return (appName is in appList)
end appIsRunning
-- Function to check if the app is frontmost or active
on appIsFrontmost(appName)
tell application "System Events"
set frontmostApp to name of first application process whose frontmost is true
end tell
return (frontmostApp is appName)
end appIsFrontmost
-- Function to check if the app has open windows
on appHasWindows(appName)
tell application "System Events"
return (count of windows of process appName) > 0
end tell
end appHasWindows
-- Loop to check every 5 seconds
repeat
if appIsRunning(appToMonitor) and not appIsFrontmost(appToMonitor) then
if not appHasWindows(appToMonitor) then
do shell script "killall " & appToMonitor
end if
end if
delay 5 -- Wait for 5 seconds before checking again
end repeat
But wondered how easy or if possible to hook up the command line API and instead of killAll, we tell 1Password to lock.
Many thanks.