Jump to content

jaster

Member
  • Posts

    32
  • Joined

  • Last visited

Posts posted by jaster

  1. I made a simple workflow a while back to rename tv show files using 'tvnamer'.

     

    Most of the time files don't have the episode's name within their title and it's even more uncommon for there to be an apostrophe as well. So since Alfred doesn't offer escaping single quotes, I was wondering what I could do to fix this.

     

    The workflow just has (one or more) files passed through to:

    /usr/local/bin/tvnamer -q -c /Users/Daniel/.mytvnamerconfig.json {query}
    
  2. When installing the first one and typing 'ss', Alfred re-shows and I don't get the AppleScript error you are describing.

     

    Could you try temporarily creating a new user account on your Mac, switching to that user and trying from there?

     

    Creating a new user did not remedy the issue either.

  3. I'm not experiencing these errors, but the event handler seems like an underlying AppleScript Event error... have you tried restarting your Mac? Is it affecting other external trigger workflows?

     

    Unfortunately, restarting my Mac did not fix it. I found two other trigger workflows to test and one of them produced the same error as mine.

     

    This is my problematic workflow: download

    The other problematic workflow: download

    The one that actually works for me: download

  4. After updating to 2.5 my workflow that uses the 'run trigger' funtion via Applescript no longer works.

     

    After running:

    tell application "Alfred 2" to run trigger "setup" in workflow "j.setup.display"
    

    The debugger returns:

    error "Alfred 2 got an error: AppleEvent handler failed." number -10000
    
  5. Much like how you can disable workflows and web searches, how about an option to disable workflow objects?

     

    Sometimes I find myself with objects that I don't want to immediately remove yet they still clutter up the workflow space. Along with an option to disable them you could add a toggle next to the top row of option buttons (debug, options, add) that makes them visible/invisible.

  6.  

    Yep, the problem is indeed that you’re not telling it to narrow down the results. A Script Filter is easier to build the more uniform it is, so here’s a starting point to help you with narrowing down. It expects every icon to be set as a png, for this very reason. To add more options, just set them at the top, in the options variable (one per line).

    options="jdownloader
    transmission
    alfred
    candybar"
    
    echo "<?xml version='1.0'?><items>"
    for item in $(echo "${options}" | grep -i ".*{query}.*"); do
      echo "<item uid='fix${item}' arg='${item}' valid='yes' autocomplete='${item}' type='file'>"
      echo "<title>${item}</title>"
      echo "<icon>${item}.png</icon>"
      echo "</item>"
    done
    echo "</items>"
    

     

    Thanks mate. That looks a lot nicer than what I've been using. I'll be sure to clean up my other workflows too.

  7. That’s likely something to do with the logic in the code; a Script Filter won’t narrow down results unless you set it up to, you have to tell it how to narrow down. Could you please post the workflow in question (or at least the Script Filter’s code), so we can take a look at it and try to figure out what’s wrong?

     

    Sure. This the script filter:

    cat << EOB
    
    <?xml version="1.0"?>
    
    <items>
    
    <item uid="fixjdownloader" arg="jdownloader" valid="YES" autocomplete="pictures" type="file">
        <title>JDownloader</title>
        <icon type="fileicon">/Applications/JDownloader.app</icon>
      </item>
    
    <item uid="fixtransmission" arg="transmission" valid="YES" autocomplete="transmission" type="file">
        <title>Transmission</title>
        <icon type="fileicon">/Applications/Transmission.app</icon>
      </item>
    
    <item uid="fixalfred" arg="alfred" valid="YES" autocomplete="alfred" type="file">
        <title>Alfred</title>
        <icon type="fileicon">/Applications/Alfred 2.app</icon>
      </item>
    
    <item uid="fixcandybar" arg="candybar" valid="YES" autocomplete="candybar" type="file">
        <title>CandyBar</title>
        <icon type="fileicon">/Applications/CandyBar.app</icon>
      </item>
    
    <item uid="fix4chan" arg="4chan" valid="YES" autocomplete="4chan" type="file">
        <title>4chan</title>
    	<icon>4chan.png</icon>
      </item>
    
    <item uid="fixdropbox" arg="dropbox" valid="YES" autocomplete="dropbox" type="file">
        <title>Dropbox</title>
        <icon type="fileicon">/Applications/Dropbox.app</icon>
      </item>
    
    <item uid="fixfinder" arg="finder" valid="YES" autocomplete="finder" type="file">
        <title>Finder</title>
        <icon type="fileicon">/System/Library/CoreServices/Finder.app</icon>
      </item>
    
    <item uid="fixtrackpad" arg="trackpad" valid="YES" autocomplete="trackpad" type="file">
        <title>Trackpad</title>
    	<icon>trackpad.png</icon>
      </item>
    
    <item uid="fix hyperdock" arg="hyperdock" valid="YES" autocomplete="hyperdock" type="file">
        <title>HyperDock</title>
        <icon type="fileicon">/Users/Daniel/Library/PreferencePanes/HyperDock.prefpane/Contents/Resources/HyperDock Helper.app</icon>
      </item>
    
    <item uid="fixmplayerx" arg="mplayerx" valid="YES" autocomplete="mplayerx" type="file">
        <title>MPlayerX</title>
        <icon type="fileicon">/Applications/MPlayerX.app</icon>
      </item>
    
    <item uid="fixxtrafinder" arg="xtrafinder" valid="YES" autocomplete="xtrafinder" type="file">
        <title>XtraFinder</title>
        <icon type="fileicon">/Applications/XtraFinder.app</icon>
      </item>
    
    <item uid="fixitunes" arg="itunes" valid="YES" autocomplete="itunes" type="file">
        <title>iTunes</title>
        <icon type="fileicon">/Applications/iTunes.app</icon>
      </item>
    
    <item uid="fixremotedesktop" arg="remotedesktop" valid="YES" autocomplete="remote desktop" type="file">
        <title>Remote Desktop</title>
        <icon type="fileicon">/System/Library/CoreServices/Screen Sharing.app</icon>
      </item>
    
    </items>
    EOB
    
  8. Unfortunately, that doesn't solve the problem of "how can Alfred know if you want the sync workflow or other results containing 'sync'?".

    If you, as the developer, set some flag to ensure that only the workflow is shown, you'd likely break things for any of your workflow users who want to use an app called "sync".

    In such cases, a good solution is to use a keyword like ".sync" or "/sync", not just "sync". This will do what you want, and won't make other results inaccessible.

     

    Currently I do have my sync workflow keyword with a period before it ".sync" to get around ths issue. But by "developers" I meant the team behind Alfred itself.

     

    I am really not sure if script filters provide this feature already but I've made two images to illustrate my problem better:

     

    What it currently does (mixes the script results in with the default results if you don't use a unique keyword):

     

    JEZ15be.gif

     

    What I'd like it to do:

    xIPDwoD.gif

  9. I think we could get around this if the developers add the option for a script filter to only activate/show its results if the user presses 'enter' after they type the keyword. I too have this problem as I've set up a script filter called 'sync' and it also shows two applications that the 'sync' keyword applies to.

    If I had the option in Alfred, I would gladly have it set to run the script filter only when I chose the 'sync' workflow in the results and press the 'enter' key.

  10. Great script. I currently cannot use the automatic discovery linked above and though my own script is similar to yours, I lke your version a lot more.

     

    One issue though, my computers are named in a conflicting manner (e.g. daniel-server) so I had to changed your script to use the '^' character rather than the dash character.

  11. Terminal appears to see it

     

     

    Browsing for _rfb._tcp

     

    Timestamp              15:30:22.145

    A/R                           Add

    Flags                        2

    if                               4

    Domain                   local.

    Service Type          _rfb._tcp.            

    Instance Name      daniel-server
×
×
  • Create New...