I've seen forum discussion (most recently within Move Frontmost Window to a Different Space) where others have expressed an interest is determining the Mission Control Space Number.
I found a very handy open source menu bar application that I've been using for months: WhichSpace. It does one simple thing well: it displays the current Mission Control Space Number on the Mac menubar.
With the help of the WhichSpace author, George Christou, I just created this macro that I will call:
at the beginning of macros that switch spaces but conclude by returning to the original space.
At the end of macros that switch spaces (but do not return to the original space).
Set SpaceNo.kmmacros (4.8 KB)