Skip to main content
Known Participant
August 13, 2025
Answered

How to get string value of an effect's ARBITRARY string data through extend script?

  • August 13, 2025
  • 1 reply
  • 282 views

Hi guys, in my effect plugin, I add an arbitrary parameter which value is a string, now I add this effect to an image layer, I want to get the string value through extend script, the value type I found is CUSTOM_VALUE, and I failed with get it through property.value directly, how to achieve this in jsx script?

 

Correct answer shachar carmi

ah, nice!

but is there some limit on the param name length? i think there is... just make sure you don't exceed it or some strange crahses will occurr...

1 reply

Community Expert
August 13, 2025

perhaps there's an easier way than the one i use, but here goes:

 

1. add some invisible checkbox that is supervised.
2. from the javascript side, leave a message in global scope (or some function to be called) that the C side can later read using AEGP_ExecuteScript(). then toggle the said checkbox. the toggling will trigger a USER_CHANGED_PARAM call.
3. from the C side use AEGP_ExecuteScript() to look for a message from the javascript side. if the message is there, read the string value from the arb and pass it back to the javascript side using AEGP_ExecuteScript().
if not message was left, then this is a regular USER_CHANGED_PARAM call, and you can process it as you would normally.
4. now the execution returns to the javascript side, where the string value awaits wherever you put it in the javascript gloval scope from the C side.

not elegant, but at least it's synchronous...

Known Participant
August 13, 2025

Thanks man! I come up with an idea which is use some hidden UI, and send my string to their controller name, in jsx side, I just get property name and combine them~

shachar carmiCommunity ExpertCorrect answer
Community Expert
August 13, 2025

ah, nice!

but is there some limit on the param name length? i think there is... just make sure you don't exceed it or some strange crahses will occurr...