Jump to content

Random: Additional 'Separated by' Options


Recommended Posts

I'm trying to setup a random quote generator, but the only options in Random are Words separated by comma or newline and Words separated by newline.

Could we have an option where we can input a specific separator, like perhaps ; | or ---

 

Since I'm using quotes, many of them have commas in them already, and when I use just 'newline' it copys ALL the quotes to the clipboard rather than just a single one since they all have newline between them. I've attempted to put additional spacing to see if that would help, but I'm still getting everything in the Clipboard. 

Link to comment
Share on other sites

@MacDaddy It's usually easiest for us to help you if you share your workflow in progress :)

 

I've just shared below my own random signatures workflow, which contains three possible signatures, each with a comma halfway through, and set to being separated by newlines.

 

Screenshot 2024-04-26 at 14.42.12.png

 

https://www.dropbox.com/s/kg8wqem8rgn5z54/Random Signature.alfredworkflow?dl=0

 

Let me know how that feels!

 

 

 

 

Link to comment
Share on other sites

11 minutes ago, MacDaddy said:

Thanks. But I can't seem to get it working. I put my quotes in and used the separator but when I do the Keyword nothing happens. Am I missing a step to get it to trigger?

 

Uhm, in that example the quotes are separated by three equal signs "===" and the Split arg  is set to split accordingly. If your separator differs, you will have to change it to the delimiter you need.

image.thumb.png.ac23a1aab50bf5292abccffc34f6efa4.png

 

Also, note that you will need to preserve the cat << EOB in the beginning and EOB at the end of the Run Script object. Your quotes would go in between those two.

 

image.thumb.png.3f134f80363e0415e919308024a948bb.png

 

 

Never mind though, if Vero's solution is working for you. In that case I am suggesting an unnecessarily complicated solution anyway.

 

Link to comment
Share on other sites

2 minutes ago, Vero said:

@MacDaddy It's usually easiest for us to help you if you share your workflow in progress :)

 

I've just shared below my own random signatures workflow, which contains three possible signatures, each with a comma halfway through, and set to being separated by newlines.

 

Screenshot 2024-04-26 at 14.42.12.png

 

https://www.dropbox.com/s/kg8wqem8rgn5z54/Random Signature.alfredworkflow?dl=0

 

Let me know how that feels!

 

 

 

 

 

I'm using the Oblique Strategies as the base, all I've done is change the contents of the Random to my quotes.

The issue I have is that I'm using quotes that already contain commas, so I can't use those to separate, and there are quotes with new lines included because the are technically jokes/Puns so leaving it on a single lines makes it strange to read

This is the contents of the Random section. I've tried with less space and mroe space with the same results:

 

Quote

 

The other day my dentist said my teeth were stained, and asked, "Do you smoke or drink coffee?" 

I said "I drink it!"


Puns are just some antics with semantics.


My friend is the squat coach at the local weight-room. He only works on weak ends.

What's a 3-letter word that starts with GAS? 
CAR

 

What do you need to know to be an auctioneer? 
Lots!

 

Someone stole my bike, so I called the cops and they found the thief... 

He was arrested for peddling stolen goods.

 

Why should you never brush your teeth with your left hand?

A toothbrush works much better.


I climbed onto the roof of my city's courthouse yesterday. The police threatened to arrest me if I didn't come down… 

I told them I was above the law.


I started attending Exaggerators Anonymous meetings. 

We get together about a million times a year.


Do they allow laughing in Hawaii? 

Or just A Low Ha?


I enjoy most Disney movies but I found Dumbo very eerie. 


I'm gonna tell you one of the biggest secrets to being a great guitar player. 

Stay tuned..


I'm so good at ruining family photos… 

I can do it with my eyes closed!


People used to think it was our ability to love that made us human… 

It turns out it's our ability to select each image containing a crosswalk.

 

 

Link to comment
Share on other sites

Almost the same thing, but with your quotes and an additional method to provide your input.

You can also paste your quotes in the Arg and Vars object, where you don't have to wrap your text in "cat << EOB / EOB".

You just need to decide on a delimiter with either approach.

 

https://transfer.archivete.am/h0bL1/Test | Quote Randomizer.alfredworkflow

Link to comment
Share on other sites

2 hours ago, zeitlings said:

 

Uhm, in that example the quotes are separated by three equal signs "===" and the Split arg  is set to split accordingly. If your separator differs, you will have to change it to the delimiter you need.

 

Also, note that you will need to preserve the cat << EOB in the beginning and EOB at the end of the Run Script object. Your quotes would go in between those two.

 

 

 

 

Never mind though, if Vero's solution is working for you. In that case I am suggesting an unnecessarily complicated solution anyway.

 

 

Appreciate this. I do have the === added in and I do have the cat << EOB and the end EOB, but when I use the keyword, nothing happens, so wondering if I'm missing something. 

Vero's solution does not help as hers uses commas and newline which will not work for mine as they are jokes, so they contain commas AND newline in many of them by default. 

Link to comment
Share on other sites

@MacDaddy Something will be happening, see the the debugger. I suspect you may missing the Automation Tasks.

 

@zeitlings Just as a general tip (though I’m confident you know this but may not have thought of it when making the quick workflow), an Arg and Vars Utility instead of the Run Script would’ve worked too, but saves the need for the cat lines. Otherwise this is pretty much how I’d have done it too.

Link to comment
Share on other sites

5 hours ago, vitor said:

@zeitlings Just as a general tip (though I’m confident you know this but may not have thought of it when making the quick workflow), an Arg and Vars Utility instead of the Run Script would’ve worked too, but saves the need for the cat lines. Otherwise this is pretty much how I’d have done it too.

 

8 hours ago, zeitlings said:

Almost the same thing, but with your quotes and an additional method to provide your input.

You can also paste your quotes in the Arg and Vars object, where you don't have to wrap your text in "cat << EOB / EOB".

You just need to decide on a delimiter with either approach.

 

https://transfer.archivete.am/h0bL1/Test | Quote Randomizer.alfredworkflow

 

indeed 😄

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...