Jump to content

How can I make a workflow that operates like the builtin calculator


Recommended Posts

I am trying to make a workflow right now for converting between various integer formats (probably other conversions later).

 

What I am trying to do is to make something like the builtin calculator which computes the result as it goes and displays the result, then copies it to the clipboard.

 

I started with a keyword -> python script (to do parsing/conversion) -> clipboard. This works but I want it to show up as I am typing. Is this possible and how could it be accomplished?

Link to comment

I am trying to make a workflow right now for converting between various integer formats (probably other conversions later).

 

What I am trying to do is to make something like the builtin calculator which computes the result as it goes and displays the result, then copies it to the clipboard.

 

I started with a keyword -> python script (to do parsing/conversion) -> clipboard. This works but I want it to show up as I am typing. Is this possible and how could it be accomplished?

 

Try moving your Python script into an 'Input > Script Filter' object. This will fire the workflow as you type.

 

To get feedback in Alfred's results, include a statement that returns an XML string (via 'echo' or some similar method). Make sure you output your results in the proper XML format (discussed here), or else you won't get any feedback.

 

Hope this helps :)

Edited by Tyler Eich
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...