rounak Posted August 28, 2016 Share Posted August 28, 2016 (edited) 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 August 28, 2016 by rounak Link to comment
deanishe Posted August 28, 2016 Share Posted August 28, 2016 tell application "Alfred 3" to search "co " is precisely what you want. search is Alfred's command to open its main query window. In the most recent versions of Alfred, you can also use Call External Trigger to tell a workflow to "restart" itself. Link to comment
rounak Posted August 29, 2016 Author Share Posted August 29, 2016 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
deanishe Posted August 29, 2016 Share Posted August 29, 2016 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
rounak Posted August 30, 2016 Author Share Posted August 30, 2016 What's wrong with the tell application "Alfred 3" to search "co " AppleScript? It works but it performs search of "co " everytime Alfred re-activates which is not required. Link to comment
deanishe Posted August 30, 2016 Share Posted August 30, 2016 (edited) 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 August 30, 2016 by deanishe Link to comment
rounak Posted August 30, 2016 Author Share Posted August 30, 2016 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 ". Link to comment
Vero Posted August 30, 2016 Share Posted August 30, 2016 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
deanishe Posted August 30, 2016 Share Posted August 30, 2016 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 ". Use the External Trigger method. Link to comment
rounak Posted August 31, 2016 Author Share Posted August 31, 2016 (edited) 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 . 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 August 31, 2016 by rounak Link to comment
deanishe Posted August 31, 2016 Share Posted August 31, 2016 (edited) 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 August 31, 2016 by deanishe rounak 1 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