Jump to content
alfredclough

New Calendar Event Using Quick Entry Option Workflow

Recommended Posts

This workflow allows you to enter a new event via Alfred using Calendar's quick entry box syntax. Type whatever you would enter in the quick entry box in Calendar in Alfred after the newevent keyword and hit enter. The workflow will pass what you type to Calendar through the Quick entry box allowing Calendar to automatically create the event.

 

Click here to download the workflow.

 

 

Share this post


Link to post

This workflow allows you to enter a new event via Alfred using Calendar's quick entry box syntax. Type whatever you would enter in the quick entry box in Calendar in Alfred after the newevent keyword and hit enter. The workflow will pass what you type to Calendar through the Quick entry box allowing Calendar to automatically create the event.

 

Click here to download the workflow.

 

Hi

 

Thanks for the great Workflow.

 

However, I'm having a problem. The calendar text is considered without spaces and therefore not created correctly.

 

"cal do this tomorrow at 3pm" creates an event for now called "dothistomorrowat3pm"

 

Any clues?

 

Thanks!

Share this post


Link to post

Hi

 

Thanks for the great Workflow.

 

However, I'm having a problem. The calendar text is considered without spaces and therefore not created correctly.

 

"cal do this tomorrow at 3pm" creates an event for now called "dothistomorrowat3pm"

 

Any clues?

 

Thanks!

 

I'm not having any problem and I've tried it repeatedly. The problem may be that it looks like you are using "cal" as a keyword. This extension is triggered by the keyword "newevent". If you are trying to passing something directly to the Calendar application then maybe that's what's causing the problem.

Share this post


Link to post

I'm not having any problem and I've tried it repeatedly. The problem may be that it looks like you are using "cal" as a keyword. This extension is triggered by the keyword "newevent". If you are trying to passing something directly to the Calendar application then maybe that's what's causing the problem.

Hey,

 

I actually changed that to cal, but all the words are together.

 

I switched to doing actually a Cmd + C of the {query} and then Cmd + V in the Quick entry field and it works now.

 

No idea why it didn't but this may help another one who can't get it to work.

 

ANyway, thanks for your awesome work :)

Share this post


Link to post

I'm not sure how to accommodate that, it's simply an Applescript that feeds what you enter to Calendar. Perhaps someone with programming skills could determine why it's interpreting what you enter incorrectly.

Share this post


Link to post

To allow Unicode characters:

set the clipboard to "{query}" as text

tell application "Calendar" to activate

tell application "System Events"
	keystroke "n" using {command down}
	keystroke "v" using {command down}
	keystroke return
end tell

Note that we're side-stepping the text entry by simply pasting the Unicode string into the field that is already selected.

Edited by ManicDee

Share this post


Link to post

Thank you ManicDee. Works great. But, at least for me, was not working if the Calendar app was not opened. Duplicating the "activate" line solves the problem. Full code I am using is:

tell application "Calendar" to activate
set the clipboard to "{query}" as text
tell application "Calendar" to activate
tell application "System Events"
	keystroke "n" using {command down}
	keystroke "v" using {command down}
	keystroke return
end tell

Thanks again!

Share this post


Link to post

To allow Unicode characters:

[…]

  

But, at least for me, was not working if the Calendar app was not opened. Duplicating the "activate" line solves the problem.

For me, it only seems to work when I give Calendar a bit of time to get ready, e. g. when I insert a delay like this:

 

set the clipboard to "{query}" as text

tell application "Calendar" to activate

delay 0.5

tell application "System Events"
	keystroke "n" using {command down}
	keystroke "v" using {command down}
	keystroke return
end tell

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.

Guest
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...