RetouchPRO

Go Back   RetouchPRO > Tools > Software > Photoshop Help
Register Blogs FAQ Site Nav Search Today's Posts Mark Forums Read


Photoshop Help Tips, questions, and solutions for Adobe Photoshop users
One tip or question per thread, please

Time stamp with PS CS4?

Reply
 
Thread Tools
  #11  
Old 03-31-2011, 10:11 PM
whoisjian whoisjian is offline
Junior Member
 
Join Date: Mar 2011
Posts: 4
Re: Time stamp with PS CS4?

cool, thanks a lot !!!

so, I have this line running in the script:

textItemRef.color(foregroundColor)

when running:
it says: Error 24: SolidColor() is not a function, Line 42 ->
textItemRef.color(foregroundColor)

I also tried with:

textItemRef.fontcolor(foregroundColor)

when running: same error.

??

Jian, Thanks
Reply With Quote top
  #12  
Old 03-31-2011, 10:42 PM
csuebele's Avatar
csuebele csuebele is offline
Member
 
Join Date: Oct 2009
Location: Los Angles area
Posts: 96
Re: Time stamp with PS CS4?

The code I gave in my earlier post changes the foreground color. It is used prior to creating a text layer. The text should then use whatever color the foreground color is set to. If you want to change a text layer's color after the fact, you can use the scriptListener plugin and record changing the color, then copy and pasting from the log file it creates into your script. Here's what scriptListener produces when the color of a text layer is changed:

Code:
var idsetd = charIDToTypeID( "setd" );
    var desc22 = new ActionDescriptor();
    var idnull = charIDToTypeID( "null" );
        var ref5 = new ActionReference();
        var idPrpr = charIDToTypeID( "Prpr" );
        var idTxtS = charIDToTypeID( "TxtS" );
        ref5.putProperty( idPrpr, idTxtS );
        var idTxLr = charIDToTypeID( "TxLr" );
        var idOrdn = charIDToTypeID( "Ordn" );
        var idTrgt = charIDToTypeID( "Trgt" );
        ref5.putEnumerated( idTxLr, idOrdn, idTrgt );
    desc22.putReference( idnull, ref5 );
    var idT = charIDToTypeID( "T   " );
        var desc23 = new ActionDescriptor();
        var idClr = charIDToTypeID( "Clr " );
            var desc24 = new ActionDescriptor();
            var idRd = charIDToTypeID( "Rd  " );
            desc24.putDouble( idRd, 230.000001 );//red rgb value goes here
            var idGrn = charIDToTypeID( "Grn " );
            desc24.putDouble( idGrn, 17.140078 );//green rgb value goes here
            var idBl = charIDToTypeID( "Bl  " );
            desc24.putDouble( idBl, 17.140078 );//blue rgb value goes here
        var idRGBC = charIDToTypeID( "RGBC" );
        desc23.putObject( idClr, idRGBC, desc24 );
    var idTxtS = charIDToTypeID( "TxtS" );
    desc22.putObject( idT, idTxtS, desc23 );
executeAction( idsetd, desc22, DialogModes.NO );
Reply With Quote top
  #13  
Old 03-31-2011, 11:26 PM
whoisjian whoisjian is offline
Junior Member
 
Join Date: Mar 2011
Posts: 4
Re: Time stamp with PS CS4?

//Change the foreground color----------------------------------------------------
var foregroundC = new SolidColor();
foregroundC.rgb.red = 244;
foregroundC.rgb.green = 128;
foregroundC.rgb.blue = 9;
foregroundColor = foregroundC;
//------------------------------------
var dateString = ''
var timeDate = ''

for (var i = 0; i <docRef.info.exif.length; i++)
{
dateString = docRef.info.exif[i].toString()

if (dateString.substring(0,18) == 'Date Time Original')
{
timeDate = '2011' + ' / ' + dateString.substring(27,29) + ' / ' + dateString.substring(24,26) + ' ' + dateString.substring(30,35)
}
}

var artLayerRef = docRef.artLayers.add()
artLayerRef.kind = LayerKind.TEXT
var textItemRef = artLayerRef.textItem
textItemRef.position = [inW,inH]
//else {textItemRef.position = [2240,3100]}
textItemRef.justification = Justification.RIGHT
textItemRef.size = 16
textItemRef.contents = timeDate
artLayerRef.name = 'timestamp'
------------
when I run this, text came out to be black, and foreground color changed to what I wanted.

I am running photoshop cs5, I imagine there should be a simple property set like:

textItemRef.color = foregroundColor *or something....

Thanks again for your lightning fast help!!!
Reply With Quote top
  #14  
Old 04-01-2011, 09:26 AM
csuebele's Avatar
csuebele csuebele is offline
Member
 
Join Date: Oct 2009
Location: Los Angles area
Posts: 96
Re: Time stamp with PS CS4?

If that is the case, I would put the bit of code I posted about changing the color after the fact at the end of the script, and change the color values to what you want. It also might be that when you run the script, you have the text tool selected and the color remains as is and is not affected by a change in the foreground color.
Reply With Quote top
  #15  
Old 04-01-2011, 11:27 AM
andrewrodney's Avatar
andrewrodney andrewrodney is offline
Senior Member
 
Join Date: May 2010
Location: Santa Fe
Posts: 1,090
Re: Time stamp with PS CS4?

Coming into this late but I wanted to point out, you can do this using File Info which brings up all the EXIF data fields you can view and edit. There are a number of fields you could enter this data: IPCT> Date Created, Origin Video Data>Date shot . Same with Audio Data. All have a cool little calendar popup to enter the data. You can make a template of this if you want, import into doc’s etc.
Reply With Quote top
  #16  
Old 04-01-2011, 11:28 AM
whoisjian whoisjian is offline
Junior Member
 
Join Date: Mar 2011
Posts: 4
Re: Time stamp with PS CS4?

Great, Thanks, I been playing around, recorded an Action to change font and color, not perfect yet, but getting there.

Thanks a lot

Jian
Reply With Quote top
  #17  
Old 05-06-2011, 04:41 AM
brolis13 brolis13 is offline
Junior Member
 
Join Date: May 2011
Posts: 1
Re: Time stamp with PS CS4?

Quote:
Originally Posted by csuebele View Post
Here is a script file you can use. Unzip the attachement and place the file timestamp in the subfolder of photoshop CS4\presets\scripts. Start photoshop. Open an image and then go to file>scripts>timestamp. This will place the date and time in the lower right corner. You can and should add this to an action. After you run the script in the action, you can adjust the layer style and such to make it more visable.
How do I add this to an action?

Last edited by brolis13; 05-06-2011 at 05:11 AM.
Reply With Quote top
  #18  
Old 05-06-2011, 07:41 AM
csuebele's Avatar
csuebele csuebele is offline
Member
 
Join Date: Oct 2009
Location: Los Angles area
Posts: 96
Re: Time stamp with PS CS4?

Quote:
Originally Posted by brolis13 View Post
How do I add this to an action?
Create a new action, run the script, stop the action.
Reply With Quote top
  #19  
Old 12-16-2011, 11:18 AM
dcast99 dcast99 is offline
Junior Member
 
Join Date: Dec 2011
Posts: 1
Re: Time stamp with PS CS4?

Coming into this late, and I dont know if this was answered or not but, I found out how to change the font color, first set the foreground and dont forget that "foregroundC" is now an object

Code:
var foregroundC = new SolidColor();
			foregroundC.rgb.red = 255;
			foregroundC.rgb.green = 255;
			foregroundC.rgb.blue = 255;
			foregroundColor = foregroundC;
so then in this line, you can refer to that object:

Code:
textItemRef.color= foregroundC
I put that under the line for font size and it worked.
Reply With Quote top
  #20  
Old 12-17-2011, 09:58 AM
DannyRaphael's Avatar
DannyRaphael DannyRaphael is offline
Moderator
 
Join Date: Mar 2002
Location: Near Seattle, Washington, USA
Posts: 6,300
Re: Time stamp with PS CS4?

Quote:
Originally Posted by dcast99 View Post
Coming into this late, and I dont know if this was answered or not but, I found out how to change the font color, first set the foreground and dont forget that "foregroundC" is now an object

Code:
var foregroundC = new SolidColor();
            foregroundC.rgb.red = 255;
            foregroundC.rgb.green = 255;
            foregroundC.rgb.blue = 255;
            foregroundColor = foregroundC;
so then in this line, you can refer to that object:

Code:
textItemRef.color= foregroundC
I put that under the line for font size and it worked.
It's never too late to share knowledge. Welcome to Retouch Pro and thanks for contributing.
Reply With Quote top
Reply

  RetouchPRO > Tools > Software > Photoshop Help


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with animated gif in CS4 Lee_Hitsugaya Photo Retouching 1 09-04-2009 05:47 PM
Digital Velvia Panel for CS4 gmitchel Software 2 08-23-2009 07:20 PM
CS4 Panel for Diffuse Glows gmitchel Software 0 08-20-2009 09:51 PM
Tone-Based Mask Panel for CS4 gmitchel Software 4 08-14-2009 08:04 PM
Beta Available for Photoshop CS4 Sharpening Panels gmitchel Software 0 08-01-2009 01:57 PM


All times are GMT -6. The time now is 09:53 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
Copyright © 2016 Doug Nelson. All Rights Reserved