- May
- 13,402
- 190
I haven't heard talk of these in a few years. IFF and @IF accept the conditional expressions "1" (actually any non-zero) and "0" as TRUE and FALSE, respectively. Is that WAD? Is that mentioned in the help?
I had forgotten about that until I was playing with an experimental plugin.
Does TCC have anything built-in to tell if mod keys are down?
With it I can make a shortcut to TCC do any of four things if I wanted to write a long enough command line to test for all the combinations of CTRL and SHIFT (shortcuts use ALT for properties). I tested with the simple command line
Is that of any value? I can't think of too many applications of it. I was thinking of adding the WIN key and of changing it to a _VARIABLE which would return a bit-map (0~15) of which of the four mod keys are down. Any thoughts? [I don't have a WIN key here so I can't test what you can/can't do while it's down.]
Code:
v:\> iff 1 then & echo foo & else & echo bar & endiff
foo
v:\> iff 0 then & echo foo & else & echo bar & endiff
bar
v:\> echo %@if[2,foo,bar]
foo
v:\> echo %@if[0,foo,bar]
bar
Code:
v:\> uhelp @keydown
@KEYDOWN[keys] = 1 if all keys are down, else 0
keys: A(lt), S(hift), C(trl)
With it I can make a shortcut to TCC do any of four things if I wanted to write a long enough command line to test for all the combinations of CTRL and SHIFT (shortcuts use ALT for properties). I tested with the simple command line
Code:
d:\tc13\tcc.exe /k echo %@if[%@keydown[s],foo,bar]