Invoke Alfred with the "Calendar++" workflow

Hi

trying to use this excellent workflow with Alfred. I want to create an event from a natural language calendar description copied from some text. The reason to use Alfred is that I want to be able to change potentially the clipboard contents before executing Alfred on this.

Here is my extension snippet:

#popclip
---
name: Alfred
identifier: com.pilotmoon.popclip.extension.alfred
description: Activate Alfred with the selected text.
popclip version: 4151
language: applescript 2.8
icon: bowler.png
app:
  name: Alfred
  link: https://www.alfredapp.com
  bundleIdentifier: com.runningwithcrayons.Alfred
  checkInstalled: true
applescript: |

  tell application "System Events"
    keystroke "c" using {command down}
    delay 0.2
  end tell

  set theText to the clipboard

  set theCommand to "CCN"

  tell application "System Events"
    keystroke space using {command down}
    delay 0.1
    keystroke theCommand
    keystroke "v" using {command down}
  end tell

I get the message: “Specify language or interpreter” when trying to install the script. What am I doing wrong?

Made by an LLM possibly? They often get subtle details wrong.

Looks like PopClip is not liking the blank lines in the AppleScript. Remove those and it should find them OK. (That is actually seeminly a PopClip bug I think?? I’ll look int that.

The language: line is not needed here, since it’s not an inverted systenax snippet, and indeed has a value that makes no sense (applescript 2.8).

The --- is also out of place though doesn’t actually make any difference.

Thanks Nick, removing the blank lines did it.

1 Like