lukekarrys Posted October 9, 2013 Share Posted October 9, 2013 (edited) I'm creating a workflow that essentially just runs a python script like this with /bin/bash python command.py "{query}" The workflow is with space and argument optional (just so it runs immediately after typing the keyword). The problem I am having is that my {query} can be a number of different things which generate different feedback and some of those things involve fetching remote data. Is there anyway to trigger the "please wait" subtext to show while this data is fetching? Currently it only displays between typing `keyword` and the first time I generate feedback. I was hoping it would be possible to do something like this (the workflow is for a task management and team chat API where a user can have multiple teams): "keyword" 1. Fetching data... Then generate feedback: 1. Autocomplete TEAM_NAME1 2. Autocomplete TEAM_NAME2 "keyword TEAM_NAME" 1. Fetching data... Then generate feedback: 1. Autocomplete ACTION1 2. Autocomplete ACTION2 Note: valid team names and stored in the cache and valid actions are stored in the code, so the "Fetching data..." is just grabbing from disk. "keyword TEAM_NAME ACTION" 1. Fetching data... Then generate feedback based on remote data: 1. Act on TEAM_NAME ACTION ID1 1. Act on TEAM_NAME ACTION ID2 My code is here if you are curious (sorry Python noob) https://github.com/lukekarrys/andbang-alfred and I am using the alp module https://github.com/phyllisstein/alp. If this isn't possible, is there a better way to structure my workflow than what I am doing now (which is essentially): # process query for team and command if team_is_invalid: alp.feedback(valid_teams) elif team_is_valid and command_is_invalid: alp.feedback(valid_commands) else: # need to display waiting message here alp.feedback(remote_data_for_team_command) Edited October 9, 2013 by lukekarrys Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now