2

This is the script, it's actually just one command:

app.foregroundColor.hsb.hue=app.foregroundColor.hsb.hue+10

The script is merely a replacement for a non-existent keyboard shortcut. I'm calling it through a keyboard shortcut, which is "pressed" by turning a rotary encoder clockwise. Obviously, there's another script that says hue-10 at the end for counter clockwise. My idea is to make turning knobs to select hue and other things.

The problem is that when I turn it slightly faster than just one step at a time, the hue slider will merely wobble but not move. I suspect photoshop can't handle the script being called so many times per second - I realize that's not what scripts are meant for in the first place.

Any ideas for a workaround? I was thinking maybe a plugin could handle things better?

  • I don't have an answer, but it sounds interesting! It sounds like your knob is sending "mixed signals" when you turn it fast. My mouse wheel does this sometimes. Can you somehow test if this is the case? Make a small script (in some other program?) to test if the knob sends both "minus" and "plus" signals when turning fast. – Wolff Oct 10 '18 at 20:11
  • Does this also happen if you assign the "hue+=10" action to work both ways? – Wolff Oct 10 '18 at 20:12
  • The knob isn't perfect in that it sometimes "bounces" back, but that doesn't seem to be the problem. Like you suggested, if I assign hue+=10 to both directions, the problem persists. – mochi Oct 10 '18 at 21:08
  • If I spin the knob quickly to go from blue towards green, the little cursor inside the hue slide will move downwards as long as I turn, but it then slides back to practically its point of origin. It's as if the scripts are stacked/layered on top of each other, last-in-first-out style, so the cursor moves to the desired position and back as PS resolves the script calls that came first. – mochi Oct 10 '18 at 21:15
  • I couldn't use my knob to try this but I did try to trigger this script 500 times with no delays in between and that seemed to work without any issues. Though it is kinda hard to say if it actually did do the thing 500 times based on the hue slider so I tried another script that moved a layer by 1px and ran that 500 times. That worked fine and I could measure the distance afterwards, though it stalled photoshop for about 20 seconds. Are you using Palette Gear or something else? In any case, I don't really understand how it could "wobble". – Joonas Oct 11 '18 at 8:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.