Replies: 3 comments 9 replies
-
OK, I think I got it ...
I didn't really find documentation for Oh, and learning that the language is basically Javascript helps for discovery. |
Beta Was this translation helpful? Give feedback.
-
I trying so hard to do something similiar. I want to remove dots from a string, for example, 34.803.198 when i copy i want to get 34803198. I wrote this, but does not work. copyq: copy(newText) |
Beta Was this translation helpful? Give feedback.
-
I am trying again something similar, but I have several problems with it. I want to paste plain text where all NL LF characters are replaced with a space character. So, this is (one of) my tries: copyq: if (text) { but I get a notification that property "replace "of scriptable byte array is not a function. I am NOT proficient in regex expressions, nor Javascript, but this I do not understand. Before this error, CopyQ complained about the last right parentheses, showing it in green together with the following text "copy (new...", thus seemed to parse something wrong. So, I copied the "text.replace..." (which was copied from CopyQ's code window back into CopyQ - which surprisingly fixed the problem, so the command ran without errors, but did not replace with space. So, I tried some other variations - and are now back with the one above (that worked) - BUT now I get the error again????? What is it that I do not understand about how to enter the code - and what is it that I am not understanding about the regex, so that it does not replace with blanks. The pattern seems to work on Regex101.com Btw, this is included in many copy managers, so that it is easy to paste text into e.g. subject fields in emails or filenames. Any thoughts on including it as standard in CopyQ (which I really like) |
Beta Was this translation helpful? Give feedback.
-
I couldn't follow the documentation for adding a command so I'd appreciate some help in what I think should be relatively easy.
I want a command that will paste the most recently copied item after replacing all dashes with spaces.
So, if the last thing I copied to clipboard was
Remove-all-of-the-dashes
it would paste as
Remove all of the dashes
Appreciate any help with the config needed in copyq to do this. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions