PhotoshopForums.com Home
Navigate Contact FAQ Search Members
Keyword data
Post new topic   Reply to topic    PhotoshopForums.com Forum Index -> Actions and Automation
 See a User Guidelines violation? Please contact us.
Author Message

grizgg1

Joined: 17 May 2010
Posts: 4



PostPosted: Mon May 17, 2010 10:51 am    Post subject: Keyword data Reply with quote

Is there an action or script that is available, so when a file is opened in Photoshop, the keyword data can be automatically viewed in another window? I know it can be seen in Bridge, however I want a closable window that displays the metadata upon opening the file with out additional keystokes to get the the file info.
See EXAMPLE.jpg
View user's profile Send private message

Paul R

Joined: 06 Apr 2010
Posts: 57



PostPosted: Mon May 17, 2010 11:34 am    Post subject: Reply with quote

All you need to do is set up File - Scripts - Script Events Manager to call this one line script on open document event.
Code:

alert(activeDocument.info.keywords);
View user's profile Send private message

grizgg1

Joined: 17 May 2010
Posts: 4



PostPosted: Mon May 17, 2010 3:43 pm    Post subject: Keyword data Reply with quote

That worked great, thanks for the help
View user's profile Send private message

thehermit

Joined: 05 Mar 2003
Posts: 3987
Location: Cheltenham, UK


PostPosted: Mon May 17, 2010 4:15 pm    Post subject: Reply with quote

GJ on the speedy answer Paul R
_________________
If life serves you lemons, make lemonade!
View user's profile Send private message

grizgg1

Joined: 17 May 2010
Posts: 4



PostPosted: Wed May 19, 2010 11:08 am    Post subject: adding another window to the code Reply with quote

If I want to add another window, i.e. the description window, to the script, do I just duplicate the code line and add description?
alert(activeDocument.info.keywords);


alert(activeDocument.info.description);
View user's profile Send private message

Paul R

Joined: 06 Apr 2010
Posts: 57



PostPosted: Wed May 19, 2010 5:07 pm    Post subject: Reply with quote

Close, but this should be better...
Code:

var doc = app.activeDocument.info;
alert(doc.keywords+"\r"+doc.caption);


Or with a bit of error checking you could use this..
Code:

var dlg = new Window( 'dialog', 'Information' );
dlg.alignChildren="column";
dlg.p1= dlg.add("panel", undefined, undefined, {borderStyle:"black"});
dlg.p1.st1 = dlg.p1.add('statictext',undefined,'Keywords');
dlg.p1.st1.alignment='left';
dlg.p1.keys = dlg.p1.add('statictext',undefined,'No keywords');
dlg.p1.st2 = dlg.p1.add('statictext',undefined,'Description');
dlg.p1.st2.alignment='left';
dlg.p1.desc = dlg.p1.add('statictext',undefined,'No description');
var doc = app.activeDocument.info;
if(doc.keywords != '') dlg.p1.keys.text = doc.keywords.toString();
if(doc.caption != '') dlg.p1.desc.text = doc.caption;
dlg.p1.but = dlg.p1.add('button',undefined,'Okay');
dlg.p1.but.onClick  = function(){
    dlg.close(1);
}
dlg.center();
dlg.show();
View user's profile Send private message

grizgg1

Joined: 17 May 2010
Posts: 4



PostPosted: Thu May 20, 2010 7:43 am    Post subject: Keywords Reply with quote

Paul R., thanks again for your help, much appreciated!
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    PhotoshopForums.com Forum Index -> Actions and Automation All times are GMT - 6 Hours
Page 1 of 1
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


Contact - User Guidelines >

Copyright © 2003-2016. PhotoshopForums.com, iFroggy Network. All Rights Reserved.
Powered by phpBB © phpBB Group. phpBB SEO. Privacy Policy.
We are in no way affiliated with Adobe. Photoshop, Adobe and related marks are registered trademarks of Adobe.
PhotoshopForums.com