You know you can copy/paste code, right? And that you can search online for these easy questions? And that “how to tell comma and space in the string” doesn’t make sense? And that you are potentially spoiling the challenge by posting code?
I used python and put in a loop which scans for changes in the clipboard, with delay, and when it found a suitable string in the clipboard it performs the operation and set the decrypted data in clipboard.