pilotmoon / PopClip-Extensions

Source code for extensions in the official PopClip Extensions directory.
https://www.popclip.app/extensions/
MIT License
1.92k stars 442 forks source link

Is there any limitation when install from snippets ? #1198

Closed NamekMaster closed 2 years ago

NamekMaster commented 2 years ago

I create a snippet as below:

# popclip abc
name: Color Preview
icon: square filled C
actions:
  - title: RGB HEX
    icon: square filled RGB
    regex: ^#[0-9a-fA-F]{6}$
    applescript: tell application "Shortcuts Events" to run the shortcut named "Show color preview" with input "{popclip text}"
  - title: RGBA HEX
    icon: square filled RGBA
    regex: ^#[0-9a-fA-F]{8}$
    applescript: tell application "Shortcuts Events" to run the shortcut named "Show color preview" with input "{popclip text}"
  - title: ARGBA HEX
    icon: square filled ARGB
    regex: ^#[0-9a-fA-F]{8}$
    applescript: tell application "Shortcuts Events" to run the shortcut named "Show color preview" with input "{popclip text}"
  - title: RGB
    icon: square filled RGB
    regex: ^rgb\([0-9.,% ]+\)$
    applescript: tell application "Shortcuts Events" to run the shortcut named "Show color preview" with input "{popclip text}"
  - title: HLS
    icon: square filled HLS
    regex: ^hls\([0-9.,% ]+\)$
    applescript: tell application "Shortcuts Events" to run the shortcut named "Show color preview" with input "{popclip text}"
  - title: HLSA
    icon: square filled HLSA
    regex: ^hlsa\([0-9.,% ]+\)$
    applescript: tell application "Shortcuts Events" to run the shortcut named "Show color preview" with input "{popclip text}"

When I select it, no install extension option shown on the popup, but it show install option after I remove any two items, like this:

# popclip abc
name: Color Preview
icon: square filled C
actions:
  - title: RGB HEX
    icon: square filled RGB
    regex: ^#[0-9a-fA-F]{6}$
    applescript: tell application "Shortcuts Events" to run the shortcut named "Show color preview" with input "{popclip text}"
  - title: RGBA HEX
    icon: square filled RGBA
    regex: ^#[0-9a-fA-F]{8}$
    applescript: tell application "Shortcuts Events" to run the shortcut named "Show color preview" with input "{popclip text}"
  - title: ARGBA HEX
    icon: square filled ARGB
    regex: ^#[0-9a-fA-F]{8}$
    applescript: tell application "Shortcuts Events" to run the shortcut named "Show color preview" with input "{popclip text}"
  - title: RGB
    icon: square filled RGB
    regex: ^rgb\([0-9.,% ]+\)$
    applescript: tell application "Shortcuts Events" to run the shortcut named "Show color preview" with input "{popclip text}"

So Is there a limitation or bug ? I also tried with different actions, it seems the number of actions are not the only limitation.

pilotmoon commented 2 years ago

Yes, there is a maximum of 1000 characters. You can increase it with

defaults write com.pilotmoon.popclip InceptionTextLimit -int 5000

then Quit and restart PopClip.