Thanks. The "temp file" solution is somewhat cumbersome. I thought there was an easier way to do it, such as launch alfred from command line with a parameter to do a search, something like: open - a Alfred\ 2 $(echo pwd). Unfortunately this is not a case.
I'm kinda stuck. I'm trying to create a simple workflow to open Alfred with the content of the current working directory in terminal.
This one opens Finder just fine:
on alfred_script(q)
tell application "Terminal"
do script "open -a Finder ./" in first window
end tell
end alfred_script
How can I modify it to open Alfred instead ?
I have a need to have this snippet in my bash workflow:
osascript <<EOT
set myString to "This\\ is\\ string"
return myString
EOT
It breaks with error:
[ERROR: alfred.workflow.action.script] Code 1: 22:23: syntax error: Expected “"” but found unknown token. (-2741)
I would like the output string to look like "This\ is\ string".
I double checked -- there is no key mapping conflict.
It does not always excibit such behavior. If I invoke it on a same selection second time, it will work (caching perhaps ?).
Try to navigate to a different folder location in a Finder and invoke this workflow using a hotkey (I have a hotkey and a keyword attached to this workflow -- could it be an issue ?).
As I said before only "ctrl" and "fn" keys are affected.
I called them "workflows" just to put it in a simple perspective. Sure, these are "built-in" functionalities.
Just as a concept: a new item could be introduced in a workflow creation screen which will contain a list of "built-in" functionalities. A passing of parameters could be done the same way it is done now: via stdin/stdout.
True. But having some type of "hooks" for Alfred built-in workflows, e.g. before it's called, after it's finished, where I can plug in my own code will open so many possibilities to tailor Alfred exactly for your needs !
Great ! Thanks a lot for your replies.
My only wish is to make Alfred to expose it's built-in features to custom workflows. Should not be THAT difficult.
I used workflow from this example: http://www.alfredforum.com/topic/1431-a-bash-script-to-get-path-of-document-open-by-the-frontmost-window/?p=9665
In a finder select any file and trigger above mentioned workflow. Select a file/folder in Alfred window. In order to trigger file actions "ctrl"/"fn" needs to be pressed twice.
It does not affect "tab"/"right arrow").
Thanks !
Hello:
I would like to incorporate Alfred built in Dictionary commands in to my own workflow.
Basically, I want to extend built in functionality by adding my custom actions after, let's say, spell check command is done. How can I do it ?
Thanks,
Oleg
Hello:
Search Fallbacks do not strip keyword from {query} resulting in wrong searches.
For example, if I have a workflow which starts with keyword "mw" the fallback search will be like that: "mw {query}". I want it to be just "{query}".
Thanks,
Oleg