Jump to content


  • Content count

  • Joined

  • Last visited

About Misha

  • Rank

Recent Profile Visitors

832 profile views
  1. This was the solution, thanks!
  2. Tiny question: is it just me or is the shortcut "ctrl+1" not available as a hotkey in a workflow?
  3. Misha

    Dynamic Script Filter

    I'm definitely doing funky things. And I'm also sure the things I do could be done differently and better. (I built my own time-clock (checking in and out for certain tasks). For that, this setup works for me because 1. it shows all the options at once, while (I believe) a file filter wouldn't 2. I can adjust the icons (they are dynamic) and 3. I can attach arguments to these options that I use later on in the workflow.)
  4. Misha

    Dynamic Script Filter

    The script reads files in a folder, and creates a script filter (list) based on the names of each of the files. In that way at least it works fine.... So yes, maybe because of Alfred's parser... Thanks for your help anyway
  5. Misha

    Dynamic Script Filter

    Thanks Deanishe for your quick reply. The item point solved the problem! (I changed the directory to "mydirectory" because of privacy reasons). I am sure there are more elegant ways of doing this, but for anyone trying to do the same, this code works for me: cat << EOB {"items": [ EOB for f in /mydirectory/*; do x=$(basename "$f") x1="${x%.*}" x12=$(echo $x | sed 's/_.*//') cat << EOB { "uid": "$x1", "type": "file", "title": "$x1", "subtitle": "", "arg": "/mydirectory/$x1", "autocomplete": "$x1", "icon": { "path": "colour_$x12.png" } }, EOB done cat << EOB ]} EOB
  6. Misha

    Dynamic Script Filter

    Hi all, is it possible to create a dynamic script filter, in the sense that the list of options is created on the basis of the contents of a directory? I currently have this code, which seems to work in the terminal, but it doesn't produce the list that I would like: for f in mydirectory/*; do x=$(basename "$f") x1="${x%.*}" x12=$(echo $x | sed 's/_.*//') cat << EOB {"items": [ { "uid": "$x1", "type": "file", "title": "$x1", "subtitle": "", "arg": "mydirectory/$x1", "autocomplete": "$x1", "icon": { "path": "colour_$x12.png" } }, ]} EOB done
  7. Misha

    selection in macos + keyword

    Thanks a lot guys, these are great suggestions. I decided for now to just use a file action, which is working fine. (Thanks for the great example-workflow @GuiB!)
  8. Hi guys, I have a workflow in which I use the (selection in macOS) as the "query" in a bash script (it runs an OCR on the selected file). To do this, I use the "argument: Selection in macOS" of the "hotkey", but I would rather use a keyword (rather than a hotkey) to run the script (so that I can for instance more easily run the OCR_english and OCR_dutch versions of the script). Is this possible?
  9. Misha

    AppleScript does not work?

    @Vero, just wondering, is it maybe also possible to activate a workflow with the "selection in macOS" as argument by using a keyword as a trigger (rather than a hotkey)?
  10. Misha

    AppleScript does not work?

    Wow, I thought Alfred couldn't get any better, but it just did. Thanks a lot!
  11. Hi guys, I wrote a little AppleScript that copies and pastes a text selection to the Alfred bar with a certain prefix: see below. The thing is, when I select text, and run the .scpt file from the Alfred bar (i.e. I look up the file and press enter) it works fine, but when I try to link this script to an Alfred keyword or hotkey, it stops working. I tried these three methods: I simply copied the content of the .scpt file into an Alfred workflow (actions --> RunNSAppleScript). Doesn't work. I wrote a bash script calling the .scpt file and attached it to the action "run script". Doesn't work. I used the action "open file" and attached the .scpt file to it. Doesn't work. It's not that these three methods don't do anything. In fact weird things happen. The text selection expands to adjacent words for example. Or I hear the "beep" of the mac "alert sound". I also sometimes seems as if the delay of 0.5 does not work. Its' not such a big deal. I can run the script by simply launching it by searching the file in the Alfred bar, but I'm still generally curious what is going on here. Any ideas?
  12. Misha

    Search content .tex file

    Thanks, I will continue the search over there!
  13. Misha

    Search content .tex file

    Thanks for the quick reply. No, stupid of me to not check that first. Spotlight also doesn't search inside .tex files either. I have found some posts about "spotlight importers" but so far I haven't found a solution yet. I know this is not the right place to ask these questions, but do you by any chance have a tip?
  14. Hi all, when I search for content inside files (which is under the prefix "in" by default), Alfred doesn't seem to read my .tex files. I have seen a couple of posts about difficulties with filtering .tex files, but I couldn't find any thread about this specific issue. Any tips? Thanks!