Jump to content

Branched Submenus / Maybe Forms? in Workflows


Recommended Posts

(I dug around the topics, and didn't see this one, so I apologize if it's a duplicate)

 

I love the new workflows, but, I would like to add multiple levels to my workflows. 

 

For instance, let's say I type:

 

formatdate 2/4/2013

 

It would popup a nested list having options like:

Month/Day/Year
Day/Month/Year
Day of week
Days since beginning of year
...

 

Or whatever options I put in there, and I can select an option, and it will (run a linux command probably) and output the result.

 

I could do a lot if I had an infinite level of submenus I could use. Maybe there's a super fancy hacky way to already do this that I don't know about. 

 

 

Additionally, it would be neat to have lil' micro forms. I'd be open to the argument that this is not within the "purpose" of Alfred. I wouldn't need anything too fancy, let's say I type:


createnumberlist

 

 

A small form would popup having:

 

Start    End
------  ------  Ascending  [x]
|    |  |    |  Descending [ ]
| 5  |  | 10 |
------  ------

 

And it would copy the list to my clipboard.

 

Maybe it could be formatted with something like Flex's MXML or something.

 

 

 

Link to comment
Share on other sites

(I dug around the topics, and didn't see this one, so I apologize if it's a duplicate)

 

I love the new workflows, but, I would like to add multiple levels to my workflows. 

 

For instance, let's say I type:

 

formatdate 2/4/2013

 

It would popup a nested list having options like:

Month/Day/Year
Day/Month/Year
Day of week
Days since beginning of year
...

 

Or whatever options I put in there, and I can select an option, and it will (run a linux command probably) and output the result.

 

I could do a lot if I had an infinite level of submenus I could use. Maybe there's a super fancy hacky way to already do this that I don't know about. 

 

 

Additionally, it would be neat to have lil' micro forms. I'd be open to the argument that this is not within the "purpose" of Alfred. I wouldn't need anything too fancy, let's say I type:

createnumberlist

 

 

A small form would popup having:

 

Start    End
------  ------  Ascending  [x]
|    |  |    |  Descending [ ]
| 5  |  | 10 |
------  ------

 

And it would copy the list to my clipboard.

 

Maybe it could be formatted with something like Flex's MXML or something.

 

Have you taken a look at Script Filters? Given your first example in this post, script filters would be perfect for this. Script Filters work similar to a keyword input but allow you to read the users input (one character at a time) and output XML that will provide actionable results to the user in the main Alfred results list. So, in your example, you could make the script filter read the input, once it detects a full date has been entered, create XML that would generate the result options to reformat the date however you want. It would have an argument associated with it. That argument would be passed to the next item of the workflow to output it however you want.

 

See the format of the results XML here.

 

You can also use AppleScript to re-action Alfred and simulate multiple steps in an Alfred workflow. See an example of that here

Link to comment
Share on other sites

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
 Share

×
×
  • Create New...