Jump to content

HotHead

Member
  • Posts

    5
  • Joined

  • Last visited

Posts posted by HotHead

  1. Hi All

    Apologies if this has already been dealt with (I have searched and not found any conclusive answer on the forum).

    Is there a way to have curly bracket placeholders other than {query} - specifically {clipboard:0}, {clipboard:1}, {clipboard:2}, ... - evaluated within a php script?

    It appears that {clipboard:7} does not get evaluated upon initialisation like {query} does, but rather remains a placeholder right up to the moment where it is passed to some Alfred output such as Large Type, and only then is the clipboard value retrieved from the DB. Code example:

    $query = "{query}";
    
    // $query has been assigned the value passed to the script
    
    
    $i = 7;
    $history_item = "{clipboard:$i}";
    
    // $history_item has not been assigned any value from the clipboad stack - it holds the literal string value '{clipboard:7}'


    That means I can't access, search, and manipulate the clipboard history items within my code. Will I need to query clipboard.alfdb manually, or is there a simpler solution?

    All help appreciated :)

  2. 38 minutes ago, deanishe said:

     

    That is the most likely cause: Java apps have caused a lot of issues with snippet expansion apps. Java has its own clipboard and doesn't do a good job of keeping it in sync with the system clipboard.

     

    Do snippets start working again once you switch to a different application and then back again?


    Ah, what do you know, it does!!!

    Yes, simply setting focus on another application and back again re-enables expansion

    (cmd+tab away and cmd+tab back again isn't quite enough - I have to physically click another app before switching back)

    I suppose that's just something I'll have to learn to live with, Java being rubbish and all?

  3. I hate to post bug reports, because it makes me sound dissatisfied.

    However, I am not. I absolutely adore Alfred. There, I said it!
    But I thought it worth to report this:


    Expansion works correctly until text has been copied within NetBeans
    After that, the keyword expands into the copied text instead of the desired snippet


    So, to put it as an example

     

    • I open NetBeans
    • I place my cursor in a document
    • I type my keyword
    • The keyword expands and my snippet appears

    Good

    • I then copy something from the document I’m working on, say “$my_lovely_variable = 3;”
    • I type my keyword
    • The keywords expands to say “$my_lovely_variable = 3;” instead of my snippet

    Not so good


    I don’t know if NetBeans being a Java application is relevant to this issue, and I haven’t got any other Java apps lying about to test with.


    Everything is the latest build:

    Alfred 3.4, Build 850, Monday 19th June 2017

    OSX 10.12.5 (16F73)

    NetBeans IDE 8.1 (Build 201510222201)

    Java version 8 Update 131

×
×
  • Create New...