Please i need macro that type randomly

please i need macro that type randomly
between the words: video and photo

You'll need to be a little more clear as to what the sequence is you want to do.

If you want something like:

photo video photo video video photo video video video photo 

You could do something like:

Repeat.kmactions (1.5 KB)

2 Likes

Your solution is simple and clear. But I like to provide the most minimalist solutions possible, even if they involve tricks. I haven't quite got one working yet, but it was going to look something like this:

This doesn't quite work, partly because I ran into two or three little problems:

  1. The links on the wiki page (token:CalculateFormat [Keyboard Maestro Wiki]) are pointing to the wrong section. It should be pointing to Appendix G. It's pointing somewhere between D and E right now.

  2. Appendix H is where the magic I wanted to perform kicks in. But for some reason I can't get it to work. Does the CalculateFormat token implement Appendix H or only Appendix G?

I didn't see that, they seemed to point to the Number_Format_Patterns section without issue.

While that is very clever, OS X 10.9+ uses at least tr35-31 (ie version 31) (it is possible later versions of OS X use later versions of tr35, but Apple’s documentation stops noting them after OS X 10.9, which says something really), and Number Choices were deprecated in version 31.

https://www.unicode.org/reports/tr35/tr35-31/tr35.html#Choice_Patterns

Note: This structure is deprecated and replaced with count attributes.

I could not find what “count attributes” is to know if that might be useful for this purpose.

A month ago I think you called me "clever", this time it's "very clever." I'm so thrilled. Anyway, back to the point at hand.

An hour ago when I clicked on the link it brought me to here: (saved in my history)
https://unicode.org/reports/tr35/tr35-6.html#Number_Format_Patterns

but now it brings me to here:
https://www.unicode.org/reports/tr35/tr35-31/tr35-numbers.html#Number_Format_Patterns

I don't know what to say. It looks like the link has changed. The former link is where I found Appendix G and H. Is there any chance someone with write privileges to the wiki saw my post and corrected the page?

1 Like

Yes, I updated the link to point to the 31 version, which as far as I can tell is what OS X supports, but it may well be the 55 version (same for regex?), I'm not sure. I should have mentioned updating the link.

In any event, the old link was the one I was talking about, and it appeared to work fine for me. My guess as far as scrolling to the wrong place is sometimes the browser loads part of the page, then scrolls, then loads more and reformats, maybe something like that.