• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Finding Photoshop Version From Automation Plug-in

Participant ,
Jul 17, 2013 Jul 17, 2013

Copy link to clipboard

Copied

Does anyone knows how to determine from within automation plug-in, on which version of Photoshop plug-in is running.

Regards,

Momir Zecevic,

Ars media

TOPICS
SDK

Views

855

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Contributor , Jul 17, 2013 Jul 17, 2013

Something along these pseudocode lines:

PutProperty(ref, classProperty, keyHostVersion);

PutEnumerated(ref, classApplication, typeOrdinal);

sPSActionControl->Get(pResult, ref);

then pResult->GetObject(keyHostVersion) followed by GetInteger(keyVersionMajor) and GetInteger(keyVersionMinor)

For copy&paste-able code run the Getter plugin and look for keyHostVersion in its output.

HTH

Votes

Translate

Translate
Adobe
Contributor ,
Jul 17, 2013 Jul 17, 2013

Copy link to clipboard

Copied

Something along these pseudocode lines:

PutProperty(ref, classProperty, keyHostVersion);

PutEnumerated(ref, classApplication, typeOrdinal);

sPSActionControl->Get(pResult, ref);

then pResult->GetObject(keyHostVersion) followed by GetInteger(keyVersionMajor) and GetInteger(keyVersionMinor)

For copy&paste-able code run the Getter plugin and look for keyHostVersion in its output.

HTH

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 17, 2013 Jul 17, 2013

Copy link to clipboard

Copied

Thank you very much,

I know that I have seen something like that but I have forgotten where. Once again thank joy.

Regards,

Momir Zecevic

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 18, 2013 Jul 18, 2013

Copy link to clipboard

Copied

LATEST

For the users eventualy having same problem here is copy/paste code:

int GetPSVersionInfo(void)

{

    int32 iVerMaj=0;

    int32 iVerMin=0;

    int32 iVerFix=0;

    SPErr error = kSPNoError;

    DescriptorTypeID runtimeClassID;

    

     PIActionDescriptor descRoot = NULL;  

     PIActionDescriptor descHostVersion = NULL;

   

     error = sPSActionDescriptor->Make(&descRoot);

     if (error) goto returnError;

    

     error = sPSActionDescriptor->Make(&descHostVersion);

     if (error) goto returnError;

    error = sPSActionControl->StringIDToTypeID("classVersion", &runtimeClassID);

    if (error) goto returnError;

       

        error = sPSActionDescriptor->GetObject(descRoot, keyHostVersion, &runtimeClassID, &descHostVersion);

         if (error) goto returnError;

       

       

        error = sPSActionDescriptor->GetInteger(descHostVersion, keyVersionMajor, &iVerMaj);

        if (error) goto returnError;

        /*

        error = sPSActionDescriptor->GetInteger(descHostVersion, keyVersionMinor, &iVerMin);

        if (error) goto returnError;

        error = sPSActionDescriptor->GetInteger(descHostVersion, keyVersionFix, &iVerFix);

        if (error) goto returnError;

        */

returnError:

    

     if (descRoot != NULL) sPSActionDescriptor->Free(descRoot);

     if (descHostVersion != NULL) sPSActionDescriptor->Free(descHostVersion);

     return iVerMaj;

}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines