Ramifications of Too Many Switch Cases?

I have a system where I use KM and TextExpander together to type a random selection of text. I have ten snippets in TE labeled rev0, rev1, rev2, etc. and then have an action in KM that uses that, ie: Insert Text by Typing rev%Calculate%RAND(10)% to leave one of ten versions of a positive review for my eBay buyers.

When I first set this up I didn’t know about the Switch/Case action. Finding it now, I see I can eliminate TE from this task by setting a Variable to RAND(10), and then if Variable is 0, then, if Variable is 1, then, etc.

Are there any ramifications re: computer resources, power usage, etc., that may come from having ten or more “ifs” in these switch/case actions? Is there a better way to do this?


1 Like

I don’t think there are any ramifications, and this is exactly what the Switch action was created for.

1 Like

This sounds like something I would be interested in. Can you post the final once you get it smoothed out?

I've already deleted that KM + TE combo system, and this is what I'm using now (lessened the number of possible responses to keep the image here from being ten feet long):

Leave Positive Feedback.kmmacros (7.2 KB)

Previously I had still been using KM to march (clumsily) through the eBay feedback page, but instead of storing all of the possible replies in the Switch Case, I was storing the replies in TextExpander (a group full of fback0, fback1, fback2, etc.) and then using this to choose one randomly:

Now that I'm using Switch Case I'm only relying on one piece of software for this task. The old way was much more cumbersome, but I can try to replicate it or dig it up if it would be useful to you.

P.S.: When I manually click the "positive" radio button, the comment field appears, but when I have KM set the radio button, it does not. If anyone can figure out how I can get the comment line in eBay's feedback page to appear without having to "Set Radio, Submit, Set Text, Submit" I would love to know how.

edit: added cleanup step and re-uploaded.