alfredclough Posted November 11, 2013 Share Posted November 11, 2013 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. claui and gr8 2 Link to comment
mgonto Posted February 10, 2014 Share Posted February 10, 2014 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
alfredclough Posted February 11, 2014 Author Share Posted February 11, 2014 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
nemrod Posted February 13, 2014 Share Posted February 13, 2014 Waow ! It works great ! Thanks a lot Link to comment
mgonto Posted February 14, 2014 Share Posted February 14, 2014 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
bmscmoreira Posted July 15, 2014 Share Posted July 15, 2014 Thanks for the workflow! But I am having problems with accentuation (for example, passing "João" results in "Joaao"). Is it easy to fix? Thanks! Link to comment
alfredclough Posted July 22, 2014 Author Share Posted July 22, 2014 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. Link to comment
ManicDee Posted September 23, 2014 Share Posted September 23, 2014 (edited) 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 September 23, 2014 by ManicDee claui and Tony D 2 Link to comment
bmscmoreira Posted November 14, 2014 Share Posted November 14, 2014 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! claui 1 Link to comment
claui Posted December 23, 2014 Share Posted December 23, 2014 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 paulw 1 Link to comment
Tony D Posted January 16, 2020 Share Posted January 16, 2020 This sounds perfect, but the link does not work - does anyone know of a new version or home? Link to comment
Kristjan Posted May 30, 2020 Share Posted May 30, 2020 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
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