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?

Share this post

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...