Jump to content

Randomiser


Tim

Recommended Posts

I'm trying to create a work flow that will select an item at random from a list, and then display that through a notification.

 

For example:

 

Keyword: Colour

Script: Select from Red/Green/Blue

Notification: Your colour is <randomly selected>

 

Also, if possible, multiple selections, with the notification remaining there. Once the second notifications appear in some of my tests, it immediately superseeds the last one (This may be a Notification issue rather than Alfred)

 

I suppose a better question is, because I think I know how to randomly select a variable in AppleScript is how to transfer that to a Notification (may not be possible?)

 

Hope that makes sense, would be grateful for any and all help!

Link to comment

Not sure if this is necessarily the easiest way to do things, but try this Applescript based workflow as a starter for 10.

 

Random Stuff Workflow

 

Download: http://ge.tt/3AWaDrV/v/0?c

 

Keyword: rcolour

Result: picks a random colour from an example list and displays it as a notification.

 

Keyword: rstuff [comma separated list]

Example usage: rstuff Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday

Result: picks a random item from a comma separated list and displays it as a notification.

 

Hope that helps.

Link to comment

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...