Jump to content

gr8

Member
  • Posts

    13
  • Joined

  • Last visited

Posts posted by gr8

  1. Alright, I played with it and changes just minor things, and ended up with a version that works well for me.

     

    http://files.timbru.com/alfred/Search Keychain.alfredworkflow

     

    Some changes:

    • 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. 

    alfred-copy-pw.gif

  2. Why would this script throw an error when used in an Alfred workflow but work when launched in Script Editor?

     

    -- from https://gist.github.com/sillygwailo/1236890
    on alfred_script(q)
    property theURL : ""
    tell application "Safari"
    	set theURL to URL of current tab of window 1
    end tell
    
    tell application "Google Chrome"
    	if (count of (every window where visible is true)) is greater than 0 then
    		tell front window
    			make new tab
    		end tell
    	else
    		make new window
    	end if
    	set URL of active tab of window 1 to theURL
    	activate
    end tell
    end alfred_script

    The error it throws in the debug console is:

     

    Quote

     

    [ERROR: alfred.workflow.action.applescript] {

        NSAppleScriptErrorBriefMessage = "Expected \U201cend\U201d but found \U201cproperty\U201d.";

        NSAppleScriptErrorMessage = "Expected \U201cend\U201d but found \U201cproperty\U201d.";

        NSAppleScriptErrorNumber = "-2741";

        NSAppleScriptErrorRange = "NSRange: {72, 8}";

    }

     

     

    See also here http://snpy.in/nRniak

     

    Sorry for the n00b question.

     

    Thanks for your help!

     

×
×
  • Create New...