Jump to content

Jono

Member
  • Posts

    178
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Jono

  1. I made this for myself (with the help of deanishe) but wondered if anyone else would find it useful? It's a search filter for AppleScripts and Automator workflows that will run them when you hit Return. In Alfred's preferences I choose to open AppleScripts rather than running them, so created this for when I want to run scripts and workflows instead. There's also an action to run scripts or workflows if you haven't used the search filter (i.e. in general file searches). Download: http://d.pr/ePo7
  2. Ah, I didn't think to change the {query} part to add my tag there. Thanks a lot One small thing, for the keyword I unchecked 'with space'. When I start typing the keyword I hit return so that it completes and selects the workflow. But it doesn't show any search results. I have to type a space for it to start searching. Is that normal? Shouldn't it start searching after I hit return? (Without having to type a space.)
  3. Is it possible to create a workflow activated with a keyword to to search for a specific Mavericks tag and show the results in Alfred? Instead of the usual way of typing in Alfred 'tags work2014' I'd just type 'work2014' (as a keyword) and it would show the tagged results in Alfred. (I only want the workflow to show files with that tag, I don't mean type any tag name into Alfred and it automatically shows results for that tag).
  4. Ah, well at least I know what's happening now, and why I'm seeing them. Thanks Andrew
  5. I do have Bookmarks checked in Alfred's preferences. (Just to make it clear) I want to see Safari bookmarks in my default search results. I also have a workflow to search specifically just for Safari bookmarks, and another to search just in Safari's history. What I'm not wanting to see in my default search results is web pages I've viewed in the past or added to Safari's Reading List, that I've not added to my bookmarks. Here's a search of my bookmarks showing that the web page returned in the search results above isn't in my bookmarks. Maybe this is a bug?
  6. Here's an example of a web page that I don't have bookmarked showing up my default search results. I did view it on another device and add it to Safari's Reading List though.
  7. I created a file filter workflow that only searches for folders. If I activate Alfred and type the keyword (in my case the letter f) to activate the workflow it 'learns' what I'm searching for, and for folders I search for often it brings them to the top of the list when I type just a few letters. I added a hotkey to activate the workflow (Control-Option-F), but when I use this it doesn't learn what I'm searching for. For this example I'm searching for a folder called 'PDF Documents' and with keyword can just type the letter p for the folder to be selected at the top of the list But if I use the hotkey to invoke the filter I keep typing 'pdf', arrow down to select the 'PDF Documents' folder and hitting Return to open it, but it never brings it to the top unless I type 'pdf d'. I have another file filter workflow activated with a hotkey to search Photoshop documents and that works fine, and learns what I'm searching for. It only seems to be a problem for me when searching for folders. I've tried rebuilding OS X metadata, Clear Knowledge (and even Clear Application Cache) to try to reset learning but nothing I've done will fix it. I'm using 2.1.1 (227) on OS X 10.9.1. Is this a bug, or just a problem for me?
  8. …as an update on this I turned off Web Search > URLs/History a while ago in Alfred's preferences, but I'm still seeing results in default searches for websites that I haven't bookmarked in Safari. Could it be possible that it's showing what's been added to my Reading List in Safari, or web pages I have open on other devices via iCloud tabs? For some of the web pages that appear in default searches I've definitely had open on other devices and/or added them to Safari's Reading List on other devices.
  9. You came to my rescue, again Ah, thanks for the explanation. That's why I couldn't get it to work. I'll do that from now on. Thanks again!
  10. I'm sure I didn't have these problems with Alfred 1 I've tried NSAppleScript, Run Script with osascript and pretty much every variation I can think of, but still can't get this to pass the app selected in Alfred to work with this AppleScript. Is it documented somewhere explaining in more details how to pass queries from Alfred to AppleScript? I've tried looking on http://support.alfredapp.com but the content is unfinished. Here's the original script I'm trying to make a workflow of that works in Finder (I'd like to select an app in Alfred, hit Tab and select the workflow as an action). tell application "Finder" to set theApp to item 1 of (get selection) set appID to id of theApp set the clipboard to appID display dialog quoted form of appID & space & "copied to the clipboard" giving up after 3
  11. No, they're not what I'm looking for. I have another workflow that searches in a Finder window, but because it's run through AppleScript I can control the windows size, position, arranged by view, thumbnail preview size etc. Basically I can control how the results are shown exactly how I want them. At the moment I have to switch from 1 workflow (file filter for quick searches) to another workflow (keyword search that opens up a large Finder window with pretty larger thumbnail previews etc.). It's not terrible, just wondering if there was a way to switch from one to the other in a easier, more elegant way
  12. Thanks a lot for the help! Ah, I didn't realise that. Good point, I'll add that extension in there too. Yea, I'll remove that.
  13. Thanks, but that doesn't work either (at least not for me). Here's the workflow if you want to look at it or try it yourself http://d.pr/f/Tv7f
  14. I have a script that checks if an Automator workflow or AppleScript is selected and then runs it. It works fine with the current file selected in Finder, but I'm having trouble getting it to work with the selected file passed from Alfred. I'm guessing (hoping) it's something simple. (I realise I could set it to run AppleScripts in Alfred's preferences, but a lot of the time want top open them, not run them.) Here's the script that works in Finder property automatorExtension : "workflow" property applescriptExtension : "scpt" tell application "Finder" set theFile to item 1 of (get selection) -- If the file is an Automator workflow if (the name extension of theFile is in the automatorExtension) then set workflowPath to theFile as text set quotedWorkflowPath to quoted form of (POSIX path of workflowPath) set command to "/usr/bin/automator " & quotedWorkflowPath set output to do shell script command else -- If the file is an AppleScript if (the name extension of theFile is in the applescriptExtension) then set theScript to theFile as alias try run script (theScript) on error _error display dialog _error end try else -- If not an Automation workflow or an AppleScript display dialog ¬ ¬ "The selected file is not an Automation workflow or an AppleScript" buttons ¬ {"Cancel", "OK"} cancel button "Cancel" default button "OK" giving up after 5 end if end if end tell And here's my botched adaptation for Alfred. I can never remember if I'm supposed to use 'Run NSAppleScript' or 'Run Script' and set it to osascript property automatorExtension : "workflow" property applescriptExtension : "scpt" on alfred_script(q) set theFile to q -- If the file is an Automator workflow if (the name extension of theFile is in the automatorExtension) then set workflowPath to theFile as text set quotedWorkflowPath to quoted form of (POSIX path of workflowPath) set command to "/usr/bin/automator " & quotedWorkflowPath set output to do shell script command else -- If the file is an AppleScript if (the name extension of theFile is in the applescriptExtension) then set theScript to theFile as alias try run script (theScript) on error _error display dialog _error end try else -- If not an Automation workflow or an AppleScript display dialog ¬ ¬ "The selected file is not an Automation workflow or an AppleScript" buttons ¬ {"Cancel", "OK"} cancel button "Cancel" default button "OK" giving up after 5 end if end if end alfred_script
  15. Thanks David, I already have one (from Andrew I think)
  16. Thanks Vero, I think it's Web Search > URLs/History that showing up. I'll turn that off
  17. Is it possible to show Safari bookmarks in the default results, but not Safari history? Safari history shows too much junk for me, I prefer to use a workflow to specifically search through Safari's history.
  18. Is there any way of setting up a workflow where I could type some letters to start a file filter search and then if wanted hold down a modifier key (Option) to switch to keyword search (that would use AppleScript and Finder), that would search for my query through that? The reason I'm wanting something like this is that sometimes when searching for Photoshop, Illustrator, Sketch documents etc. it will be enough to search with a file filter in Alfred. But sometimes I want to open up the search in a larger Finder window with more room to see what I'm searching for, thumbnail previews etc.
  19. When using the calculator I often want to take the result of one sum (from the result below) back into Alfred's search field above to calculate another sum with it. I know I can hit return to copy it to the clipboard, activate Alfred again and then paste the result in. But is there an quicker/easier way of doing this? I.e. a single keystroke to put the previous result back into Alfred's main search field?
  20. Very useful, thanks! Is there any way for it to show the app prices in my own currency (£GBP) instead of $USD?
×
×
  • Create New...