Tuesday, December 6, 2011

The code from ''getter'' plug in

I want to get the code to draw Bezier path. The listener log could not get the codes. But the code from getter log could not work rightly.



-------------------------------------

error = sPSActionControl-%26gt;StringIDToTypeID(''Getting Work Path Info'', %26amp;runtimeEventID);

if (error) goto returnError;



error = sPSActionControl-%26gt;Play(%26amp;result, runtimeEventID, desc00001040, plugInDialogSilent);

if (error) goto returnError;

---------------------------------------

In the last sentence, it is error.



Do you use getter code all right?

I hope to discuss with you. Thank you.
The code from ''getter'' plug in
Didn't you ask this before?



Aandi Inston
The code from ''getter'' plug in
Yes,I asked this before. But there is no answer. I am not sure it because the question is illegible.



Other path could get from listener log. But the Bezier curve path could not. Is it secret for Adobe?



I try to ''getter'' plugin to get the code. But it is not work. I guess that ''Getting Work Path Info'' is not in effect for photoshop. But I could not find other appropriate ''event''. Couldn't the code from ''getter'' plugin be used?



Thank you for your attention. Please help me. Thanks.

It is worth reposting once, but more is unlikely to help unless you

say clearly that you have done so. The same people will see it, and

will have no more reason or ability to answer than before.



Personally, I have no knowledge that can help you, sorry.



Aandi Inston

Listener and Getter are similar but not the same. The same part is the way that getter/listener ''dump'' descriptor information to disk. Listner code can be copy/pasted to an automation plug-in and executed 99% of the time. Implementing getter code in your automation plug-in is different. You should look at the Getter example to see exactly what is going on. Getter shows you what can be ''got'' from Photoshop. Meaning, if Getter can write it to disk then the information is available.



Here is the trick.



Listener uses Put* routines. Getter needs Get* routines but 'writes' Put* routines because the same routine is writing out the descriptor contents. (Think about it for a while and it will be clear.)



So, figure out what class you need to ''get''. classApplication, classDocument, classLayer.



Figure out what property you need. keyNumberOfDocuments, keyName



And grab that info with a eventGet.

Thank you, Tom Ruark!

No comments:

Post a Comment