`@sendkey...` runs unconditionally

Is it normal that @sendkey... isn't only run when there's a selection, but unconditionally?

@ifsel
@sendkey:shift+f10

I read that if-statements like @ifsel are evaluated before the script runs, so are static during script execution and influenced by it. But @sendkey... technically performs an action. Is it somehow still executed before other commands that the script could also contain?

"and influenced by it" should be "and not influenced by it [the script execution]". (Couldn't edit anymore.)

I don't think that's the case, from looking at the code the line is processed in order with other "action" lines.

Oh, I'm sorry, "unconditionally" was wrong. The behavior is:

  • Without a selection, I couldn't get clicking the drop-down item with the code to ever show a menu.
  • With a selection, the menu is sometimes shown and sometimes not. When clicking many times on the drop-down item with the code, I experience phases of shorter to longer length where it's either the one or the other. Maybe a race condition.

(I may have initially only experienced a phase where no menu was shown with a selection, and then confused the "polarity" to the opposite of "unconditionally".)

But can I expect @sendkey... to behave like commands that are executed sequentially, or is there also something special with the @ in this case?

They should be sequential, yes.