Jump to content

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.

 

 

Link to comment
  • 2 weeks later...
  • 2 months later...

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!

Link to comment

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.

Link to comment

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 :)

Link to comment
  • 5 months later...
  • 2 months later...

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
Link to comment
  • 1 month later...

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!

Link to comment
  • 1 month later...

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
Link to comment
  • 5 years later...
  • 4 months later...

The way I did it was simple using 4 elements.

 

1. create a keyword trigger (argument required).

2. Create a "Copy to Clipboard" element with {query} in the box.

3. Create a launch app element with Calendar

4. Add a run script element with code type as /osascript (AS):

 

on run
delay 0.5
tell application "System Events"
    keystroke "n" using {command down}
    keystroke "v" using {command down}
    keystroke return
    delay 0.5
    key code 48
    key code 125
end tell

end run

 

Vola.

 

Alas, it does not allow you to do it in the background but you could probably add some lines to the code to open the current application again.
 

 

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