This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > PainShop Pro Scripting > June 2006 > New Script - NameDate





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author New Script - NameDate
Howard Dickson

2006-04-02, 6:44 pm

Folks,

I was asked recently to write a very simple script, which would display
the filename (title) of the image, and also the original Time and Date
that the shot was taken.

You can see and download this free script here...
http://www.sheilsoft.com/psp/namedate.htm

It's meant to run non-interactively, so it can be used easily for batch
processing multiple files. To allow this, there are 3 options which can
be altered by editing the script. You will see these options at the top
of the script.

'Dateformat' allows you to select between the UK and US method of
displaying dates (enter 0 for UK, 1 for US). Default UK.

Similarly, you can select if you want the Time and/or Date displayed. If
both are set for '0' then only the Name is displayed. Default both
displayed.

The Name is derived from the filename, where the file extension is
removed, and the first letter is capitalized. The original file Time &
Date is extracted from the image's EXIF data. This will obviously only
be available on files that have retained their EXIF data, otherwise Name
only will be displayed.

Rgds,
Howard

--

---oooOOOooo---

Sheilsoft
ComputerSystems

www.sheilsoft.com

---oooOOOooo---
Joske

2006-04-04, 7:03 pm

Howard Dickson wrote:

> Folks,


> I was asked recently to write a very simple script, which would
> display the filename (title) of the image, and also the original
> Time and Date that the shot was taken.


> You can see and download this free script here...
> http://www.sheilsoft.com/psp/namedate.htm


> It's meant to run non-interactively, so it can be used easily for
> batch processing multiple files. To allow this, there are 3
> options which can be altered by editing the script. You will see
> these options at the top of the script.


> 'Dateformat' allows you to select between the UK and US method of
> displaying dates (enter 0 for UK, 1 for US). Default UK.


> Similarly, you can select if you want the Time and/or Date
> displayed. If both are set for '0' then only the Name is
> displayed. Default both displayed.


> The Name is derived from the filename, where the file extension is
> removed, and the first letter is capitalized. The original file
> Time & Date is extracted from the image's EXIF data. This will
> obviously only be available on files that have retained their
> EXIF data, otherwise Name only will be displayed.


I don't personally have a need for it, but of course I looked to see
what new useful script you put out. No surprise: it works like a
charm, and is easy to configure too.

Joske



Bill Porter

2006-05-26, 7:27 pm


"Howard Dickson" <howard@REMOVEsheilsoft.com> wrote in message
news:442fa9a0_2@cnews...
> Folks,
>
> I was asked recently to write a very simple script, which would display
> the filename (title) of the image, and also the original Time and Date
> that the shot was taken.
>
> You can see and download this free script here...
> http://www.sheilsoft.com/psp/namedate.htm


Howard,

should this run with PSP9?

I ask because I'm trying to run it with v9 and am getting the following
error:

*******************************************************

Executing RunScript
Executing ReturnImageInfo
Executing ResizeCanvas
Executing ResizeCanvas
Executing AddBorders
Executing Text
------- Command Execution Failed -----------
Command Name: Text
Error Text: The requested object (document layer, or vector object) could
not be found
Traceback (most recent call last):
File "C:\Documents and Settings\billp\My Documents\My PSP
Files\Scripts-Restricted\SsoftNameDate.PspScript", line 222, in Do
App.Do( Environment, 'TextEx', {
JascApp.ObjectNotFound: Object not found

Script 'SsoftNameDate' has completed with an error.

*********************************************************

It's almost certainly me being stupid but if it works then it's something
I'd find very useful!

TIA

Bill


Howard Dickson

2006-05-26, 7:27 pm

Bill Porter wrote:
> "Howard Dickson" <howard@REMOVEsheilsoft.com> wrote in message
> news:442fa9a0_2@cnews...
>
> Howard,
>
> should this run with PSP9?
>
> I ask because I'm trying to run it with v9 and am getting the following
> error:
>
> *******************************************************
>
> Executing RunScript
> Executing ReturnImageInfo
> Executing ResizeCanvas
> Executing ResizeCanvas
> Executing AddBorders
> Executing Text
> ------- Command Execution Failed -----------
> Command Name: Text
> Error Text: The requested object (document layer, or vector object) could
> not be found
> Traceback (most recent call last):
> File "C:\Documents and Settings\billp\My Documents\My PSP
> Files\Scripts-Restricted\SsoftNameDate.PspScript", line 222, in Do
> App.Do( Environment, 'TextEx', {
> JascApp.ObjectNotFound: Object not found
>
> Script 'SsoftNameDate' has completed with an error.
>
> *********************************************************
>
> It's almost certainly me being stupid but if it works then it's something
> I'd find very useful!
>
> TIA
>
> Bill
>
>

Bill,

Yes, this script should (and does) run in PSP9.
It's probably just an image/configuration problem.

If you can email me an image that your getting this error on, I'll have
a look for you.

Rgds,
Howard
--

---oooOOOooo---

Sheilsoft
ComputerSystems

www.sheilsoft.com

---oooOOOooo---
JoeB

2006-05-26, 7:27 pm

Howard Dickson <howard@REMOVEsheilsoft.com> wrote in
news:4476eb96$1_1@cnews:

> Bill Porter wrote:
would[color=darkred]
original[color=darkred]
object)[color=darkred]
in Do[color=darkred]
it's[color=darkred]
> Bill,
>
> Yes, this script should (and does) run in PSP9.
> It's probably just an image/configuration problem.
>
> If you can email me an image that your getting this error on,

I'll
> have a look for you.
>
> Rgds,
> Howard


Howard, I get the same script error, and it shows the problem at
line 222 also just like it does for Bill. I'm also using v.9 and
the v.9 script. The image gets a border added an area under the
image for the caption, but no text. The script output is:

Executing RunScript
Executing ReturnImageInfo
Executing ResizeCanvas
Executing ResizeCanvas
Executing AddBorders
Executing Text
------- Command Execution Failed -----------
Command Name: Text
Error Text: The requested object (document layer, or vector
object) could not be found
Traceback (most recent call last):
File "C:\Documents and Settings\Joe Belland\My Documents\My PSP
Files\Scripts-Restricted\Sheilsoft\SsoftNameDate.PspScript", line
222, in Do
App.Do( Environment, 'TextEx', {
JascApp.ObjectNotFound: Object not found

Script 'SsoftNameDate' has completed with an error.
Bill Porter

2006-05-30, 6:51 pm


"Howard Dickson" <howard@REMOVEsheilsoft.com> wrote in message
news:4476eb96$1_1@cnews...

> Yes, this script should (and does) run in PSP9.
> It's probably just an image/configuration problem.
>
> If you can email me an image that your getting this error on, I'll have a
> look for you.



Howard, I've tried this again after doing an on-line update of PSP9 (to
9.0.1) and the script now works just fine, so thanks for input. As an
aside, would it be possible to get the text, ideally just the date / time to
print on the image rather than below, or even to print in a similar manner
to that done by cameras themselves (yellow, 7-segment-looking text)?

Bill


Fabrice Roux

2006-05-30, 6:51 pm

In article <447bf1e6_3@cnews>, b.e.p@btinternet.com says...
> As an
> aside, would it be possible to get the text, ideally just the date / time to
> print on the image rather than below, or even to print in a similar manner
> to that done by cameras themselves (yellow, 7-segment-looking text)?


You might want to try my export script:

http://www.fabriceroux.com/pspscripts/export.html

Edit the file header and disable the functions that you don't need.

It should look like:

# Signature options
bSignatureEnable = 1
szSignatureText = u'$EXIFDate / $EXIFTime'
szSignatureFont = u'DS-Digital'
nSignaturePosition = 5

For the font get DS Digital from this link:
http://www.dafont.com/theme.php?cat=302&page=5

FYI the EXIF directive that are interpreted at runtime are:

# Possible EXIF directives:
#
# $EXIFArtist = Photographer name
# $EXIFCopyright = Copyright
# $EXIFComments = Comments
# $EXIFBrand = Camera brand
# $EXIFCamera = Camera name
# $EXIFFocal = Lens focal (ie 24mm -> 24)
# $EXIFAperture = Aperture (ie f/2.0 -> 2.0)
# $EXIFISO = ISO (ie 400 -> 400)
# $EXIFShutter = Shutter speed (ie 1/125s -> 125)
# $EXIFYear = Year
# $EXIFDate = Date
# $EXIFTime = Time

Have fun...

--
Fabrice Roux aka [RS]Faramir_agst
PaintShop Pro and Tribes scripts
http://www.fabriceroux.com
Howard Dickson

2006-05-30, 6:51 pm

Bill Porter wrote:
> "Howard Dickson" <howard@REMOVEsheilsoft.com> wrote in message
> news:4476eb96$1_1@cnews...
>
>
>
> Howard, I've tried this again after doing an on-line update of PSP9 (to
> 9.0.1) and the script now works just fine, so thanks for input. As an
> aside, would it be possible to get the text, ideally just the date / time to
> print on the image rather than below, or even to print in a similar manner
> to that done by cameras themselves (yellow, 7-segment-looking text)?
>
> Bill
>
>

Bill,

Of course, this is all possible.

I've rattled off a quick version for you (see attached), which can be
easily edited to your own needs.

Rgds,
Howard
--

---oooOOOooo---

Sheilsoft
ComputerSystems

www.sheilsoft.com

---oooOOOooo---

Bill Porter

2006-05-30, 6:51 pm


"Howard Dickson" <howard@REMOVEsheilsoft.com> wrote in message
news:447bfdee$1_1@cnews...

> I've rattled off a quick version for you (see attached), which can be
> easily edited to your own needs.


Thanks for that Howard - well beyond the call of duty!

Bill



Bill Porter

2006-06-03, 7:29 pm


"Fabrice Roux" <spam_my_box@wanadoo.fr> wrote in message
news:MPG.1ee61656b9199aa7989682@cnews.corel.com...
> In article <447bf1e6_3@cnews>, b.e.p@btinternet.com says...
>
> You might want to try my export script:
>
> http://www.fabriceroux.com/pspscripts/export.html


You guys are so helpful! - thanks!

OK, as I seem to be getting all I want here, howabout getting the Exifdate
to print in UK format (dd/mm/yy)?


Bill



Howard Dickson

2006-06-03, 7:29 pm

Bill Porter wrote:
> "Fabrice Roux" <spam_my_box@wanadoo.fr> wrote in message
> news:MPG.1ee61656b9199aa7989682@cnews.corel.com...
>
> You guys are so helpful! - thanks!
>
> OK, as I seem to be getting all I want here, howabout getting the Exifdate
> to print in UK format (dd/mm/yy)?
>
>
> Bill
>

Bill,

Are you referring to the NameDate script?
If so, if you open the script with Notepad, you'll see there is a date
format toggle section at the top of the script.
Set to 'dateformat = 0' for UK.

Rgds,
Howard
--

---oooOOOooo---

Sheilsoft
ComputerSystems

www.sheilsoft.com

---oooOOOooo---
Bill Porter

2006-06-03, 7:29 pm


"Howard Dickson" <howard@REMOVEsheilsoft.com> wrote in message
news:447daf39$1_2@cnews...
> Bill Porter wrote:
[color=darkred]
> Bill,
>
> Are you referring to the NameDate script?
> If so, if you open the script with Notepad, you'll see there is a date
> format toggle section at the top of the script.
> Set to 'dateformat = 0' for UK.


Actually Howard, I was referring to Faramir Export.PspScript from Fabrice as
this seems to come closer to exactly what we need, with the obvious
exception of the date format. (I hope the quoting above has worked out)


Thanks,

Bill.




Bill Porter

2006-06-03, 7:29 pm


"Fabrice Roux" <spam_my_box@wanadoo.fr> wrote in message
news:MPG.1ee61656b9199aa7989682@cnews.corel.com...
> In article <447bf1e6_3@cnews>, b.e.p@btinternet.com says...
>
> You might want to try my export script:
>
> http://www.fabriceroux.com/pspscripts/export.html


Fabrice,
this is working well now - just what I was looking for, thanks - one last
thing, how can I get the date to display in UK format (dd/mm/yy or yyyy)

Thanks,


Bill



Fabrice Roux

2006-06-03, 7:29 pm

In article <447e9dad$1_1@cnews>, b.e.p@btinternet.com says...
> Fabrice,
> this is working well now - just what I was looking for, thanks - one last
> thing, how can I get the date to display in UK format (dd/mm/yy or yyyy)


Well I'll have to update my support script so it can use 2 more EXIF
directives:
# $EXIFMonth = Month
# $EXIFDay = Day

Since I haven't update anything in a long while... this is the trigger that
will force me to work on the scripts.

While I'm there I might also add hour, minute and second:
# $EXIFHour = Hour
# $EXIFMinute = Minute
# $EXIFSecond = Second

I'll keep you posted... and I really need to update the documentation too.
Unfortunately I'm pretty booked 'til the end of next week. So it will be a
pre-release just for you. :)

--
Fabrice Roux aka [RS]Faramir_agst
PaintShop Pro and Tribes scripts
http://www.fabriceroux.com
Bill Porter

2006-06-03, 7:29 pm


"Fabrice Roux" <spam_my_box@wanadoo.fr> wrote in message
news:MPG.1ee8da3a8e453bb6989683@cnews.corel.com...
> In article <447e9dad$1_1@cnews>, b.e.p@btinternet.com says...
>
> Well I'll have to update my support script so it can use 2 more EXIF
> directives:
> # $EXIFMonth = Month
> # $EXIFDay = Day
>
> Since I haven't update anything in a long while... this is the trigger
> that
> will force me to work on the scripts.
>
> While I'm there I might also add hour, minute and second:
> # $EXIFHour = Hour
> # $EXIFMinute = Minute
> # $EXIFSecond = Second
>
> I'll keep you posted... and I really need to update the documentation too.
> Unfortunately I'm pretty booked 'til the end of next week. So it will be a
> pre-release just for you. :)


You sir, are a star!

Bill



Sponsored Links


Copyright 2003 - 2009 forum4designers.com  Software forum  Computer Hardware reviews