Jump to content

How to Output Query in a Script?

Recommended Posts

I'm creating a workflow to add tasks to Nozbe using a keyword + query. I have it functioning now, however, it has a flaw I think more experience creators can tell me how to easily fix (this is my first workflow creation).


Currently I have the keyword triggering an AppleScript with the following code:


on alfred_script(q)
   tell application "Nozbe"
      tell application "System Events"
         key code 53
         delay 0.1
         keystroke "i"
         keystroke "a"
         keystroke "v" using command down
         key code 36
         key code 53
      end tell
   end tell
end alfred_script
While this works, it requires saving the {query} with the "Copy to Clipboard" output and running the above AppleScript.
I want to remove the need for the copy to clipboard so it doesn't clutter it up and have the query directly inputed into the highlighted text box on Nozbe.
How can I run the AppleScript to paste the {query} at the bolded section of the script above?
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...