问题
I use 1Password
to store my passwords, and fluid.app
to create a few site-specific apps/browsers
While 1Password
integrates well with Chrome, Safari and other browsers, it doesn't play nicely with Fluid apps, which is where my troubles lie.
I have therefore created a shortcut (with Keyboard Maestro
) to run an applescript to open the mini, when I am in Fluid apps. However, I can't seem to get the applescript to launch the mini. Here are my attempts:
tell application "1Password mini" to launch
does nothing, though AppleScriptEditor doesn't report any errorstell application "1Password mini" to open
nothing, though AppleScriptEditor doesn't report any errorstell application "1Password mini" to activate
is pointless, as1Password mini
is already activatedtell application "1Password" to open
opens the main1Password
application, not the mini, which is what I need.
Interestingly, when I run (1), (2), and (3), AppleScriptEditor
automatically replaces 1Password mini
with 2BUA8C4S2C.com.agilebits.onepassword-osx-helper
, which doesn't clarify things for me at all.
Does anybody have any clue how this can be solved?
I'm on OSX 10.10.2 (Yosemite), if it matters
回答1:
I work for AgileBits, the developer of 1Password.
Looks like you found a solution, but here's another option for you:
open location "x-onepassword-helper://search/"
That AppleScript will open 1Password mini ready to search.
And if you're able to get the current website's domain from Fluid, you could even open 1Password Mini with a search term already filled in:
open location "x-onepassword-helper://search/twitter.com"
I hope that helps!
回答2:
The solution was quite simple, with a little UI scripting:
tell application "System Events" to tell process "1Password mini"
tell menu bar item 1 of menu bar 1 to click
end tell
来源:https://stackoverflow.com/questions/29107777/applescript-to-launch-1password-mini