Skip to main content
Inspiring
January 10, 2022
Question

SDK, How to pass argument to my own plugin...

  • January 10, 2022
  • 1 reply
  • 734 views

Hey

 

I'm neck deep in sdk and already losing my marbles here... so maybe some1 can give me a hint.

 

Say I have this in JSX to run my plugin

var miTestPluginVar= stringIDToTypeID( "miTestPluginUniqueIDBlablabla" );
executeAction( miTestPluginVar, undefined, DialogModes.NO );

How could I pass to it a string? Can I ? 

I take I will be able to "fish it out of " > 

DLLExport SPAPI SPErr AutoPluginMain(const char *caller,
                                     const char *selector,
                                     void *message)

Message somehow, by casting it to something and then "black magic" happens. But to get to that point... 

 

Regards

Dariusz

 

 

This topic has been closed for replies.

1 reply

Tom Ruark
Inspiring
January 11, 2022

The second param to executeAction is an ActionDescriptor (JavaScript). Fill that up with your data with Put* calls and get it out of the message in AutoPluginMain with ActionDescriptor (C++) Get* calls. See Hidden and AutomationFilter for an example.

Inspiring
January 12, 2022

@Tom Ruark Thank you for the ping! Looks interesting, I noticed some parts of it now, will dig more !

 

Also so to this post > https://community.adobe.com/t5/photoshop-ecosystem-bugs/including-piuaszstring-cause-entire-sdk-to-explode/idi-p/12644813#comment-on-this I cant post in that topic for some reason. In any case, I got it "fixed" by removing all the test projects from my cmake project (im on windows & cmake) Still trying to wrap my head around how to build it all in cmake/etc. 

 

Thank you for help! Will be back to this topic later on once I have some updates on the data flow.

Kukurykus
Legend
January 12, 2022

See if you may at least mark for formality my newest reply in that thread as correct.