Jump to content


  • Content Count

  • Joined

  • Last visited

About Dwight

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Done. It was tricky because I do not know PHP but now its exactly working how I want it to 🙂 Thank you deanishe for your valuable help 👍
  2. Ok, thank you. The workflow is called Leo Dictionary and you can find it on https://github.com/psistorm/alfredapp What I figured out so far: The Script Filter is using a script leo.php leo.php is using a function toxml() of workflow.php to generate an XML file toxml() is mainly generating an item list Alfred comes with an Advanced Script Filters example workflow and the script filter called xvar is giving an example of how to work with variables ==> In my opinion it should work if the toxml() function will be extended in such a way, that it also puts the variable I need into the XML file. This would be a kind of dirty approach but on the other hand the Leo workflow is not under development anymore and XML is deprecated. So, it would not make to much sense to put a lot of effort into changes. I do not know PHP neither but I have the impression this "hack" could not to be that complicated
  3. Thank you for the help. I now understood that I have to output a certain JSON in order to assign values to environment variables. I did not really understood the Leo workflow but I assume you are right: Probably the PHP code itself must be changed. Will try to figure it out some day later.
  4. Hello all, I defined a variable "input" as Workflow Environment Variable in a workflow. Especially it is the "Leo Dictionary" workflow from Bastian Ohmer. The script in the script filter is: require('leo.php'); $in = "{query}"; $leo = new Leo("ende"); echo $leo->getTranslations($in); with Language: /usr/bin/php, "with input as {query}" and as Escaping "Double Quotes" and "Dollars". I would like to assign "{query}" to my my "input" environment variable in order to be able to use it after the script filter in other action modifiers. Everything I tried failed. E.g.: require('leo.php'); $in = "{query}"; SetEnv $input $in; $leo = new Leo("ende"); echo $leo->getTranslations($in); ==> Code 254: Parse error: syntax error, unexpected '$input' (T_VARIABLE) in Command line code on line 4 Any ideas how to solve it? Thank you very much
  • Create New...