Jump to content

Add custom TEXT as a Keywork argument like in Hotkey


Carlos-Sz

Recommended Posts

Now you can set a custom text as the Hotkey (trigger) argument.

 

This is useful when the workflow needs a custom user information e.g. the Dropbox ID for public links (it is different for each user).

 

Here is my Dropbox workflow: http://www.alfredforum.com/topic/460-workflow-move-selected-finder-file-to-dropbox-url-to-clipboard/?p=2090

 

In order to make things easier for the user it would be great to have the same Hotkey text argument for the Keyword: instead the Hotkey the user may bring Alfred and type only the keyword (no argument necessary to be typed) and the workflow would start ({query} would be the text argument, of course).

 

I hope I was clear.

 

In resume, maybe it would be interesting to have a better way to ask for user personal information such as the Dropbox ID. Maybe, a text box where the user could input his information that will be available as a constant (like {query}) to be used in the workflow.

Link to comment
Share on other sites

A method for setting workflow related data has been previously suggested.

 

You could always just lay out an area in your code that allowed the user to type in such information where it gets saved into a variable when the script is run. In the newer betas, there is also an area when dealing with Workflows to create notes for the Workflow. You could set instructions here informing the user that they must set this value for the Workflow to execute properly. You could also check the value of the variable and show error messages if the value hasn't been set by the user  yet.

 

As an alternative, you could always allow additional keywords or options from a script filter to allow a user to set such data and have it stored in a plist or a text file.

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
×
×
  • Create New...