Jump to content

vitor

Staff
  • Posts

    8,523
  • Joined

  • Last visited

  • Days Won

    711

Posts posted by vitor

  1. Thanks! It seems to be no way to grab the url in Firefox?

    Like I say it the post, it is technically possible, but not in an “official” manner. You have to send keystrokes to go to, select, and copy on the url bar, or in some cases do it via javascript, and all of these are error prone in one way or another, so I prefer to simply not include it in my workflows.

  2. I that case, what you want to look at is the arg attribute. The XML is purely to inform the formatting of the output in Alfred, it’s not supposed to actually do anything. What you do is build a script that does something with the arguments you give it, and then on the XML you use the arg attribute to feed it those arguments.

     

    Check the posts again, and download the workflow from the first one, as it is simple and uses the arg attribute to pass along arguments.

    You can also check my PinAdd, WatchList, and LabelColor workflows (links in the signature; “LabelColor” will probably the the easiest one to understand), for some real-world examples.

  3. Have you tried the updated instructions? You should only need to start at step 6, and it’s pretty straightforward, now, just one small addition and one small substitution. That said, f you still find it confusing, please let me know (so I can make the instructions better), and get the version you want (link available for seven days).

    It’s actually a good thing that you’re redoing it, since WatchList was updated to work a different way, recently, and this way you’ll get the new compatible version.

  4. Well, if it replaced the clipboard after pasting the directory in, then it wouldn’t need to replace it at all, but I agree, it should revert the clipboard to what it was before (similar to what TextExpander does). In the meantime, what you can do to circumvent this is to activate the clipboard history feature (Open Preferences → Features → Clipboard); which means you can at least get back the content you previously copied.

  5. +1, I'd love to see this functionality

     

    Two usage examples:

    • Top Processes by zhaowu. Activity Monitor has live information; I rarely use the workflow because I want to know when the process in question starts to settle down as it happens
    • Wolfram|Alpha by Tyler Eich. Many users have complained about how long it takes Wolfram|Alpha to respond as they type; if the workflow could let the user know that the script is still working as it provides the last set of results, it could save a few confused users.
    There are many factors to consider with this behavior, though. What can be 'updated'? Everything (arg, title, subtitle, icon, autocomplete, valid)? Can order of results be changed? Maybe a manual 'disable' button for Alfred's intelligent sorting? Is selection maintained after the update?

    How could I have forgotten top? Same here, I use it way less than I’d like, simply because the information does not update on the fly. There’s actually another way to go about this. On this particular workflow, the first node could be changed to contain.

    cat << EOF
    <?xml version='1.0'?><items>
      <item uid='repeatrepeat' arg='{query}' valid='yes' autocomplete='repeatrepeat'>
        <title>$(date "+%H:%M:%S")</title>
        <subtitle></subtitle>
        <icon>icon.png</icon>
      </item>
    </items>
    EOF
    
    and the second one

    tell application "Alfred 2" to search "repeatrepeat  "
    
    repeat {query} times
    	delay 1
    
    	tell application "Alfred 2"
    		tell application "System Events"
    			keystroke " "
    			key code 51
    		end tell
    	end tell
    end repeat
    
    tell application "System Events"
    	key code 53
    end tell
    
    What this would do is, instead of calling Alfred over and over again (making the window “flash”), you would pick a number beforehand and the workflow would type a space and delete it immediately once a second — since the script filter runs every time a key is entered, this would work visually better

    18NYwBD.gif

    Unfortunately, this has one huge drawback — if you leave Alfred (by pressing ⎋) before the repeat command finishes, it’ll effectively keep pressing those keys over and over, until it finishes (which could effectively leave you unable to use your computer for the allotted time).

  6. This workflow is officially deprecated in favour of Alfred’s native rerun in Script Filters, introduced in 3.2. You can find the old source on Github.

     

    An experiment to answer a question.

     

    Type repeatrepeat and the workflow will automatically start typing . (so it auto-runs again) repeatedly, once every two seconds. It’s a hack but it works well enough, with the only issue being it’ll still type . once after you dismiss it, which may lead to unpredictable results depending on what other apps you’re running.

     

    oKk2fdY.gif

×
×
  • Create New...