Jump to content

re-activate Alfred after running an action


Recommended Posts

I type "co " & <text>

<text> gets appended to Evernote note via "Run Script" Action.

 

I want Alfred to show itself up again with "co ", so that I can add more text.

 

I want to avoid using

tell application Aflred 3 to search <text>

 

since search is not required.

 

Thanks.

 

sorry for the edit.

Edited by rounak
Link to comment
In the most recent versions of Alfred, you can also use Call External Trigger to tell a workflow to "restart" itself.

 

I understand that you are talking about using 

tell application "Alfred 3" to run trigger "com.evernote.co" in workflow "com.username.evernote" with argument "test"

but I cannot seem to getting it working for me. Could you please show an example of a workflow restarting itself?

Link to comment

Oh sorry, there's a new Call External Trigger Output, but that's only in the beta version at the moment.
 
This workflow I'm currently working on uses AppleScript to restart the workflow. Check out the yellow and green actions on the right (the notes on the elements mention that they call External Triggers).
 
What's wrong with the tell application "Alfred 3" to search "co " AppleScript?

Link to comment

:D That's because:

 

I want Alfred to show itself up again with "co ", so that I can add more text.

 

If you just want the standard, empty query box, leave out the query:

 

tell application "Alfred 3" to search

Edited by deanishe
Link to comment

I guess, what I am asking for is not possible in Alfred. I want the text "co " to stay but that is not possible without Alfred searching for "co ".

 

 

Hi there,

 

Could you please fill in your registered Powerpack email address in your forum profile, as this is a Powerpack-related feature?

 

Thanks,

Vero

Link to comment

Hi there,

 

Could you please fill in your registered Powerpack email address in your forum profile, as this is a Powerpack-related feature?

 

Thanks,

Vero

 

I have done that now! :) 

 

Please give me the solution as a workflow download :unsure: . I will re-state what I want:

 

1. Type "co <string>"

2. osascript is run

on run {query}

tell application id "com.evernote.evernote"
set notebook1 to "shop_work"
set myNotes to find notes "intitle:Customer Orders"
set myNote to item 1 of myNotes
tell myNote to append text theQuery
end tell
end run
3. Alfred re-opens with the "co " typed in, without attempting to search for "co "
4. repeat step 2 and so on
 
Edit: Just updated Alfred to the latest stable version and now I have the "Call External Trigger" but not sure how to use it yet
Edited by rounak
Link to comment

If I tried to make you a workflow, it would most likely be broken because I don't have Evernote to test it with.

 

Step 3 isn't possible. If you enter "co " into Alfred (using the keyboard or AppleScript), it will search for "co". That's just how Alfred works.
 
That shouldn't be an issue, however. After you've used your workflow a couple of times, Alfred will associate it with the query "co" and it will always be the top result. Just keep typing.
 
To use an External Trigger, first you create the External Trigger and connect it to your Script Filter (or whatever it is you want to launch). Then you add a Call External Trigger Output (or use the provided AppleScript) to call it at the end of your action.
 
Also, this is broken: on run {query}
 
{query} is a placeholder. When Alfred runs your script, it does a search-and-replace for {query} and replaces it with the input.
 
If you enter the text "next line of my note", your script now reads on run next line of my note, which is not valid AppleScript.

Whether you use input as argv or {query}, follow the template Alfred gives you.

Edited by deanishe
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...