Sucesso Posted August 30, 2021 Posted August 30, 2021 Trying to build my own workflow, and I know it's pretty basic. I want to: copy some text replace all new lines or carriage returns with a certain character, for example | or / THEN I want to trim excess white space (leaving one space) from the previous output. and finally, Copy to Clipboard I have it working the way I want, except for step 3--I'm not sure how to add in that step. Here's what I have in step 2: Hotkey > Replace (regext) \n+ with / > Copy to Clipboard I tried adding a step after step 2 to trim whitespace (including Transform), but I think I'm missing something. The second image shows what I tried. What do I add after step 2 to trim whitespace? Thanks!
vitor Posted August 30, 2021 Posted August 30, 2021 It’s impossible to tell what you’ve done from screenshots alone. Please post your Workflow somewhere so we’re able to take a proper look.
Sucesso Posted September 4, 2021 Author Posted September 4, 2021 Disculpe e obrigado. I have uploaded the workflow here. I'm pretty sure it's something very simple. I looked at a few tutorials, but none of them that I found address this particular issue.
Pearcen Posted September 5, 2021 Posted September 5, 2021 Is this what you wanted it to do? Take a block of text with multiple spaces in it and return a single line with \\ replacing newlines and a single space replacing any double or more spaces? eg: input: This is Some test so lets see how this goes with seeing if this does anything output: This is Some test so lets // see how this goes with seeing if this does anything This is what I added to get the above result and I also changed your snippet trigger to a keyword for testing. Sucesso 1
Sucesso Posted September 6, 2021 Author Posted September 6, 2021 Thanks! I'm trying this, but something's not working. I'll post back when I test it some more.
deanishe Posted September 6, 2021 Posted September 6, 2021 4 hours ago, Sucesso said: Thanks! I'm trying this, but something's not working. I'll post back when I test it some more. Check which whitespace is in your input. It might be some exotic Unicode that doesn't match the regex above. Sucesso 1
Pearcen Posted September 8, 2021 Posted September 8, 2021 On 9/6/2021 at 11:31 AM, Sucesso said: Thanks! I'm trying this, but something's not working. I'll post back when I test it some more. @Sucesso Download my version from https://github.com/pearcenuk/Alfred-public/raw/main/_Paste without newlines.alfredworkflow and see if that works as it does for me. Things I've updated I've coloured red and left comments Sucesso 1
Sucesso Posted September 8, 2021 Author Posted September 8, 2021 4 hours ago, Pearcen said: @Sucesso Download my version from https://github.com/pearcenuk/Alfred-public/raw/main/_Paste without newlines.alfredworkflow and see if that works as it does for me. Things I've updated I've coloured red and left comments Wow! You really go the extra mile, doncha? I'll take a look now. Pearcen 1
Sucesso Posted September 8, 2021 Author Posted September 8, 2021 6 hours ago, Pearcen said: @Sucesso Download my version from https://github.com/pearcenuk/Alfred-public/raw/main/_Paste without newlines.alfredworkflow and see if that works as it does for me. Things I've updated I've coloured red and left comments That's perfect! Not sure what's different; I thought mine was the same. Does it make a difference that your final step is dragged down and lower? Versus mine, which was straight across? I assumed it didn't make a difference. Never mind, I just tested it; it doesn't make a difference. I'm assuming you dragged it down to fit in the window so that I wouldn't get confused. Pearcen 1
Pearcen Posted September 9, 2021 Posted September 9, 2021 5 hours ago, Sucesso said: That's perfect! Not sure what's different; I thought mine was the same. Does it make a difference that your final step is dragged down and lower? Versus mine, which was straight across? I assumed it didn't make a difference. Never mind, I just tested it; it doesn't make a difference. I'm assuming you dragged it down to fit in the window so that I wouldn't get confused. Extra mile. hehehe nah, just really got into Alfred the last year and thought if I can help then why not. It makes no difference how it laid out at all. I just put it there and coloured it to make it obvious what I had done. Glad it is working for you and good luck and enjoy Alfred and all it has to offer. Sucesso 1
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