Very simple/basic question but all I keep getting is "The SAFARITABCOUNT() function returns the number of tabs in the front Safari window."
I need to get the number of tabs open in a window, save it to a variable and then use this variable as a count for the number of times the macro will be repeated.
I didn't do the macro yet, I'm planning to, but I know how to do it.
All I need is:
What's the right syntax
In which action would I use it.
Just because I'm not sure if I was clear enough, I tried to use in an "if then else" action ("if SAFARITABCOUNT()>8 play this otherwise play that". It worked but I have no idea how to move on to use it in the macro I want.
...repeat count can be a simple number, or you can use a variable or other calculation in the field
...and that the SAFARITABCOUNT() function returns the number of tabs in the front Safari window.
The missing bits are that a) you can use functions in a calculation -- indeed, a function can be the entire calculation -- and b) "small" number fields with a little C icon in them look like they are just for numbers but will expand when you start to type in a calculation. So:
You don't need to explicitly set a variable unless you want to the value at some other point in the macro (and can't just get SAFARITABCOUNT() again).
You're right. It's just that it's such a SO basic question that I tried to avoid posting here. You are all so advanced and I'm still scratching the surface...
And the thing is... that all I needed was just to read what was in the Wiki. When I got there I skipped straight to the functions, expecting to see a description/examples and so... (We say... if your brain doesn't work, your feet will)....
I'd like to blame my age... problem is... that I'd have done it also 30 yrs ago...
OK, so I went to the links you sent me... READ THEM and... all is solved (on the way I also "grew up" a bit (KM speaking)... Everything I wanted is working like new...
@Nige_S
Thanks a lot for your detailed help. Very much appreciated!
Thank you both, guys, you are GREAT! And hope you all have a great coming week!
Saul
Yes β it can be embarrassing to ask newbie questions, ignorant questions, or especially β dumb questions.
I've asked some doozies online going waay back to various BBSes and CompuServe β and of course IRL more than a few times.
It's much better to ask a potentially embarrassing question than to waste hours of time.
On the other hand β it's preferable to not ask dumb questions... (I rate a dumb question as one someone spent no time at all trying to figure out for themselves.)
I rigorously avoid asking dumb questions β so even when I'm feeling fuzzy or lazy I'll force myself to spend some time researching β even if it's only a few minutes. Sometimes I hit pay-dirt way faster than I thought I would β sometimes not.
When I'm looking for something I tend to follow this progressionβ¦
Search using the Search Field of the Keyboard Maestro Editor's Help Menu.
Yes, but not everyone is using KM for 7 years and still in kindergarten either....
Anyway, I think I owe much of the progress I've made to this forum and the wonderful people who are willing to help! BIG thanks to you guys!!!
AND a big thanks to Peter who's leading the tribe...
O why not pull this from the leaved litter and give it some sun .
I will always toddle in the programming garden. I'm growing my trees elsewhere, with the ever-useful help of the sequoias, the tall pines, the broad-leafed summer trees, the quick snakey vines, the air plants, the two-leafed sprouts, the varicolored lichen and the occasional speaking rock, all of whom in those guises teach here, and in other guises learn elsewhere. Fear not being ignorant: the world is powers on powers more complex than any can master: we are all kinders in others gartens. Know yourself well enough to know when you have spent enough time to not waste other's; become skilled with simple tools and queries. Seine the whole liquid forest for the low-hanging fruits, eat of them, and if still hungry post your question on the nearest trunk. The forest itself knows when and how to respond.
In my case just today, this moment, the gloaming of that we signpost some form of Thu 21 Nov 2024, I have found the always ripe pear that Chris left: "It's a function β¦ and Functions in Keyboard Maestro are β¦ ", wrapt with the additional kindness of not only encouraging but providing practical meta-advice.
Now I know. I learned. I was taught. My own trees shakes out fresh leaves. Thanks to the fruit-leavers (My). Thanks to the forest-managers (O my!).