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

While closing the document ".exe" (or) a script should be get triggered?

Community Beginner ,
Feb 06, 2009 Feb 06, 2009
Can anybody tell me the feasibility of the below process in Adobe
Photoshop:

While closing the Photoshop(CS,CS2 and CS3) document(please note that not Application!), an .exe (or) a script should be get triggered. Is this possible pals, if so, is this possible in Java script (or) VB script? Could you please let me know the details and samples.

Thanks,
Prabudass
TOPICS
Actions and scripting
894
Translate
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
Adobe
Valorous Hero ,
Feb 06, 2009 Feb 06, 2009
Just set it up in File - Scripts - Scripts Event Manager
and select Event 'Close Document'
You can then trigger an action or a script of your choice.
Translate
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
Explorer ,
Feb 06, 2009 Feb 06, 2009
Paul_R@adobeforums.com wrote:
> Just set it up in File - Scripts - Scripts Event Manager
> and select Event 'Close Document'
> You can then trigger an action or a script of your choice.

Note that the document has already been closed. Fortunately, you can access a
global 'arguments' array which should contain the ActionDescriptor for the Close
event. The document's filename will be in there. Then you can all your exe or
script with the info.

There is no way to be notified about a Close until _after_ it has occurred.

-X
Translate
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
Community Beginner ,
Feb 06, 2009 Feb 06, 2009
Thanks for the responses. I think "Scripts Event Manager" available in photoshop cs3. Is there any way for cs and cs2? Kindly advice me.

Thanks,
Prabudass
Translate
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
Valorous Hero ,
Feb 07, 2009 Feb 07, 2009
Scripts Event Manager does exit in Photoshop CS2
Translate
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
Guru ,
Feb 07, 2009 Feb 07, 2009
Xbytor,

Can you post an example for getting the doc's file using arguments?

When I try I get either an empty descriptor if the doc's saved property was true or a one key descriptor that has the close options if it was false.
Translate
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
Explorer ,
Feb 07, 2009 Feb 07, 2009
> Can you post an example for getting the doc's file using arguments?

arguments[0] is the TypeID of the event.
arguments[1] is the ActionDescriptor.

I don't know if there are ever any other arguments. I only recently found out
about this.

You probably need to look at Save and Close to get some sense of what's going
on. I can't make any promises about what is actually in the descriptors, but
this is the only way I know of to get any kind of information at all in this
situation.

-X
Translate
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
Guru ,
Feb 07, 2009 Feb 07, 2009
LATEST
I had a look at the arguments of the close event. It seems if the user chooses Yes to the save changes dialog you can get the path to the file that was closed.

arguments[0].getPath(stringIDToTypeID('in'));

If they choose No or the doc's saved property was true, the path is not in the descriptor.
Translate
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