Javascript expressions are computationally expensive, this is why they are not supported as trigger conditions. For example, if you turn the mouse wheel quickly, AutoControl would have to evaluate a Javascript expression on the target page many times per second, and depending on the result of the JS expression, AutoControl would have to decide whether to override the mouse wheel action or not. In summary, the Chrome browser cannot evaluate a JS expression fast enough for this process to work smoothly.
You can work around this limitation by using a Switch condition.
In order to turn the Switch on and off you must use the
ACtl.switchState() function from the injected script:
The attached file "Scroll wheel in Twitter carousel 3.acs" contains the full working configuration.
An alternative workaround is to override the wheel-turn and then re-inject it only if a Javascript condition is true, as follows:
Unfortunately, this will not work smoothly enough because the script takes some fraction of a second to execute, so you will notice some short delay in the responsiveness of the scroll wheel.
However, you could still use this method on other cases such as keyboard keys or mouse buttons where there's no need for an instantaneous response.
The attached file "Scroll wheel in Twitter carousel 4.acs" contains the full configuration for this method.