Script to increase value each time triggered?
Hey guys just a quick one..
Is it possible to create a script that can add a value each time it's triggered?
for example. this little script below I created sets the Dehaze value to 5.
is there a way to create a script that adds 5 each time it's triggered rather then just setting it to a specific number? I can't work it out.
tell application "Capture One 22"
tell the primary variant
set dehaze amount of adjustments to 5
end tell
end tell
The reason why I'm wanting to achieve this is because I have a Tangent Wave midi controller and I want to then trigger the script with a button or knob to increase/decrease the amount. this will be activated by a keyboard short cut to trigger the script.
I'll obviously have two scripts, one for increasing the amount and the other for decreasing.
is this at all possible?
Best regards,
And thanks so much,
Kim
-
You can use the current value and a bit of math to increment and decrement a value:
set dehaze amount of adjustments to 5 + (dehaze amount of adjustments)
0 -
Wow!!! Wonderful!!!! Thank you so much Emory! I got it working. had to figure out the minus direction which is of course the math the other way round but it now works perfectly.
tell application "Capture One 22"
tell the primary variant
set dehaze amount of adjustments to (dehaze amount of adjustments) - 1
end tell
end tell
Now I can easily create a keyboard shortcut to effect any parameter which isn't natively supported using a midi controller.
Thank you
regards
Kim
0
Please sign in to leave a comment.
Comments
2 comments