This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > PainShop Pro Scripting > October 2007 > Saving parameters outside script
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 |
Saving parameters outside script
|
|
| Big Bad Dave 2007-10-14, 6:15 am |
| Good morning all.
Can anyone help me? I'm trying to write a script that is able to save a
couple of floating point variable values so that they can be used next time
the script is run.
I can think of two ways that this could be done (saving the values in an
external text file that is read in next time the script is run, or saving
the values in the windows registry using the _winreg library), however I
don't really like either of these (partly because they force you to put the
script into the trusted folder). I'm sure that PSP must provide a way of
adding a parameter to a repository, or provide you with a scratch area or
something. I don't really mind if the mechanism doesn't retain the values
when PSP is shut down.
Gary Bartons 'Pause' script packs information into the open image
'Description' parameter, but I want to be able to run the script on multiple
images and have the same values used.
Any suggestions?
Thanks
DaveP
p.s. I'm using PSP-X2
| |
| SuzShook 2007-10-14, 6:18 pm |
| There is a solution, Dave - the ScriptData Communication Area, or SCA! I
wrote a tutorial that explains how to use this incredible storage area,
which allows you to store information for the duration of your PSP session.
You can find the tutorial here:
http://suzshook.topcities.com/tutor...tdata/index.htm
The tutorial is written for PSP 9, but should work equally well for PSP X2.
Let me know if you run into any problems. Suz
--
Suz Shook
C-Tech Volunteer
Big Bad Dave wrote:
> Good morning all.
>
> Can anyone help me? I'm trying to write a script that is able to
> save a couple of floating point variable values so that they can be
> used next time the script is run.
>
> I can think of two ways that this could be done (saving the values in
> an external text file that is read in next time the script is run, or
> saving the values in the windows registry using the _winreg library),
> however I don't really like either of these (partly because they
> force you to put the script into the trusted folder). I'm sure that
> PSP must provide a way of adding a parameter to a repository, or
> provide you with a scratch area or something. I don't really mind if
> the mechanism doesn't retain the values when PSP is shut down.
>
> Gary Bartons 'Pause' script packs information into the open image
> 'Description' parameter, but I want to be able to run the script on
> multiple images and have the same values used.
>
> Any suggestions?
>
> Thanks
>
> DaveP
>
> p.s. I'm using PSP-X2
| |
| Fred Hiltz 2007-10-14, 6:18 pm |
| Big Bad Dave wrote:
> Can anyone help me? I'm trying to write a script that is able
> to save a couple of floating point variable values so that
> they can be used next time the script is run... I don't really
> mind if the mechanism doesn't retain the values when PSP is
> shut down. I'm using PSP-X2
Hi Dave,
SuzShook wrote this on Jan 22, 2005 for PSP 9. It's worth a try in
PSP 12:
"Use the undocumented ScriptData Communications area to store the
values, since you are using PSP 9. The user-supplied values can be
stored like this:
ScriptData['Trim'] = Result['EnteredNumber']
"Anything stored in the ScriptData Communications area is available
to all scripts for the duration of the PSP session. Therefore, the
script that is called from the Batch Process dialog can read in the
stored values in this manner:
Trim = ScriptData['Trim']
"Both scripts need to have this line added right after the 'from
JascApp import *' line for this to work:
from JascUtils import ScriptData"
--
Fred Hiltz, fhiltz at yahoo dot com
| |
| SuzShook 2007-10-14, 6:18 pm |
| It works in X2!
Fred Hiltz wrote:
> Big Bad Dave wrote:
>
> Hi Dave,
>
> SuzShook wrote this on Jan 22, 2005 for PSP 9. It's worth a try in
> PSP 12:
>
> "Use the undocumented ScriptData Communications area to store the
> values, since you are using PSP 9. The user-supplied values can be
> stored like this:
>
> ScriptData['Trim'] = Result['EnteredNumber']
>
> "Anything stored in the ScriptData Communications area is available
> to all scripts for the duration of the PSP session. Therefore, the
> script that is called from the Batch Process dialog can read in the
> stored values in this manner:
>
> Trim = ScriptData['Trim']
>
> "Both scripts need to have this line added right after the 'from
> JascApp import *' line for this to work:
> from JascUtils import ScriptData"
| |
| Big Bad Dave 2007-10-14, 6:18 pm |
| Big Bad Dave wrote:
> Good morning all.
>
> Can anyone help me? I'm trying to write a script that is able to
> save a couple of floating point variable values so that they can be
> used next time the script is run.
>
> I can think of two ways that this could be done (saving the values in
> an external text file that is read in next time the script is run, or
> saving the values in the windows registry using the _winreg library),
> however I don't really like either of these (partly because they
> force you to put the script into the trusted folder). I'm sure that
> PSP must provide a way of adding a parameter to a repository, or
> provide you with a scratch area or something. I don't really mind if
> the mechanism doesn't retain the values when PSP is shut down.
>
> Gary Bartons 'Pause' script packs information into the open image
> 'Description' parameter, but I want to be able to run the script on
> multiple images and have the same values used.
>
> Any suggestions?
>
> Thanks
>
> DaveP
>
> p.s. I'm using PSP-X2
Thanks Suz & Fred. That looks like exactly what I'm after. I'm left
wondering why something that useful isn't documented.
DaveP
| |
| SuzShook 2007-10-14, 6:18 pm |
| Big Bad Dave wrote:
> Big Bad Dave wrote:
>
> Thanks Suz & Fred. That looks like exactly what I'm after. I'm left
> wondering why something that useful isn't documented.
>
> DaveP
I never understood why Corel did not document this feature, either. They
added it after much pressure by Gary Barton and others to provide this
capability, but chose not to include one syllable in the documentation - for
4 versions of PSP now!!!! Hence, my tutorial! Hope it helps, Dave. Suz
| |
| Fred Hiltz 2007-10-14, 6:18 pm |
| SuzShook wrote:
> Big Bad Dave wrote:
> [snip]
>
> I never understood why Corel did not document this feature,
> either...
Sad to say, it is all too easy to understand. We have to get used to
the way Corel does busi ness, where *every* decision includes "how
many more copies will this sell?"
It explains as well the half-baked implementations of 16-bit, HDR,
layer styles, etc.; just enough work to get them on the features
list and into the superfi cial magazine reviews. Any more is an
unrecovered cost.
--
Fred Hiltz, fhiltz at yahoo dot com
| |
| Big Bad Dave 2007-10-14, 6:18 pm |
| Fred Hiltz wrote:
> SuzShook wrote:
>
> Sad to say, it is all too easy to understand. We have to get used to
> the way Corel does busi ness, where *every* decision includes "how
> many more copies will this sell?"
>
> It explains as well the half-baked implementations of 16-bit, HDR,
> layer styles, etc.; just enough work to get them on the features
> list and into the superfi cial magazine reviews. Any more is an
> unrecovered cost.
Oooh Fred, you cynic... and there I was thinking that they bought the Jasc
IP so they could compete on the world stage.
| |
| Fred Hiltz 2007-10-15, 3:16 am |
| Big Bad Dave wrote:
> Fred Hiltz wrote:
[snip]
[snip]
[color=darkred]
> Oooh Fred, you cynic... and there I was thinking that they
> bought the Jasc IP so they could compete on the world stage.
Less a cynic than an observer of their behavior, I'm afraid. We
began to see some world class work from Jasc with the introduction
of scripting, the customizable interface, digital camera noise
removal, and chromatic aberration removal. The first thing Corel did
was to fire the talented folks who did these. What have we seen
since in this league?
Joe Sixpack does not know what digital camera noise is, much less
why one might want to remove it, but his mon ey is just as good as
mine and there are many more of him. Corel and their masters at
Vector Capital have it exactly right: se ll Joe a suntan brush, a
thinnify tool, and an organizer.
Speaking of which, it is about time for V.C. to take their money.
Not right now (see
http://www.cbc.ca/cp/technology/071010/z101035A.html) but before
long. Look for Corel in the business pages.
--
Fred Hiltz, fhiltz at yahoo dot com
| |
| Joëlle 2007-10-15, 6:20 pm |
|
"Fred Hiltz" <not@home.ca> wrote in message news:4712d8ad$1_3@cnews...
> Big Bad Dave wrote:
> [snip]
> [snip]
>
>
> Less a cynic than an observer of their behavior, I'm afraid. We
> began to see some world class work from Jasc with the introduction
> of scripting, the customizable interface, digital camera noise
> removal, and chromatic aberration removal. The first thing Corel did
> was to fire the talented folks who did these. What have we seen
> since in this league?
>
> Joe Sixpack does not know what digital camera noise is, much less
> why one might want to remove it, but his mon ey is just as good as
> mine and there are many more of him. Corel and their masters at
> Vector Capital have it exactly right: se ll Joe a suntan brush, a
> thinnify tool, and an organizer.
>
> Speaking of which, it is about time for V.C. to take their money.
> Not right now (see
> http://www.cbc.ca/cp/technology/071010/z101035A.html) but before
> long. Look for Corel in the business pages.
> --
> Fred Hiltz, fhiltz at yahoo dot com
>
>
How depressing, both the firing of mega-talented people and the dumbing-down
of such a good program.
Isn't there anyone out there who can reverse the trend PSP-wise?
If only someone (very rich) could buy it and re-hire the people who can and
do make a difference, then let them do what needs doing.. just thinking
aloud here..
:-)
Joëlle
| |
|
| Joëlle wrote:
> "Fred Hiltz" <not@home.ca> wrote in message news:4712d8ad$1_3@cnews...
>
>
>
> How depressing, both the firing of mega-talented people and the
> dumbing-down of such a good program.
> Isn't there anyone out there who can reverse the trend PSP-wise?
> If only someone (very rich) could buy it and re-hire the people who
> can and do make a difference, then let them do what needs doing..
> just thinking aloud here..
>
> :-)
> Joëlle
But its been stagnant for 3 years so you would need to get the market back
from Adobe as well as making PSP greater again. Its get the share back that
would put investors off
--
Trev
You can always tell a Yorkshire man,
But you can't tell him much.
| |
| Fred Hiltz 2007-10-15, 6:20 pm |
| Trev wrote:
> Joëlle wrote:
> [snip]
>
> But its been stagnant for 3 years so you would need to get the
> market back from Adobe as well as making PSP greater again.
> Its get the share back that would put investors off
I think Trev is right. Catching up to Adobe would cost more than one
might make from the product. My own hope is that Adobe will
recognize the enthusiast mark*t and offer something between PS and
PSE: a "PS lite" without the pre-press features and the integration
into Creative Suite.
--
Fred Hiltz, fhiltz at yahoo dot com
| |
| Joëlle 2007-10-15, 6:20 pm |
|
"Fred Hiltz" <not@home.ca> wrote in message news:4713a25e$1_3@cnews...
> Trev wrote:
>
> I think Trev is right. Catching up to Adobe would cost more than one
> might make from the product. My own hope is that Adobe will
> recognize the enthusiast mark*t and offer something between PS and
> PSE: a "PS lite" without the pre-press features and the integration
> into Creative Suite.
and a customisable workspace like PSP, or do they do that already? (...not
that I have any plans to leave the still afloat ship)
:-)
Joëlle
> --
> Fred Hiltz, fhiltz at yahoo dot com
>
>
| |
| Spandex Rutabaga 2007-10-15, 6:20 pm |
| "Joëlle" wrote:
> and a customisable workspace like PSP, or do they do that already? (...not
> that I have any plans to leave the still afloat ship)
Bear in mind that you won't be able to leave the ship after it
has sunk. The water pressure would have crushed your lungs.
http://floatingclassroom.tamu.edu/T...fo/Pressure.pdf
| |
| Joëlle 2007-10-15, 6:20 pm |
|
"Spandex Rutabaga" <SpRu@agabatur.xednaps> wrote in message
news:4713BB27.E5B6FBA@agabatur.xednaps...
> "Joëlle" wrote:
>
>
> Bear in mind that you won't be able to leave the ship after it
> has sunk. The water pressure would have crushed your lungs.
> http://floatingclassroom.tamu.edu/T...fo/Pressure.pdf
Hehe, filling footballs with water makes them burst, did you read that? ;-)
| |
| Barbara J Bradley 2007-10-15, 6:20 pm |
|
"Spandex Rutabaga" <SpRu@agabatur.xednaps> wrote in message
news:4713BB27.E5B6FBA@agabatur.xednaps...
> "Joëlle" wrote:
>
>
> Bear in mind that you won't be able to leave the ship after it
> has sunk. The water pressure would have crushed your lungs.
> http://floatingclassroom.tamu.edu/T...fo/Pressure.pdf
Does water pressure have the same effect on a rutabaga? A written report
on the results will be nice. ;)
| |
| Spandex Rutabaga 2007-10-15, 6:20 pm |
| Barbara J Bradley wrote:
>
> "Spandex Rutabaga" <SpRu@agabatur.xednaps> wrote in message
> news:4713BB27.E5B6FBA@agabatur.xednaps...
>
> Does water pressure have the same effect on a rutabaga?
Yes, it has the same effect but produces different results.
> A written report on the results will be nice. ;)
The PDF is attached.
| |
|
| Spandex Rutabaga <SpRu@agabatur.xednaps> wrote in news:4713E5AA.D1566E07
@agabatur.xednaps:
> Barbara J Bradley wrote:
>
>
> Yes, it has the same effect but produces different results.
>
>
Given the rotundity of the baga, I'd suspect there are more Mars bars
inside of it than under it :-)
Regards,
JoeB
| |
| Joëlle 2007-10-16, 6:22 pm |
|
"JoeB" <mymail@myserver.com> wrote in message
news:Xns99CAB3890DFE9JoeB@207.107.16.194...
> Spandex Rutabaga <SpRu@agabatur.xednaps> wrote in news:4713E5AA.D1566E07
> @agabatur.xednaps:
>
>
> Given the rotundity of the baga, I'd suspect there are more Mars bars
> inside of it than under it :-)
>
> Regards,
>
> JoeB
Hehe...
| |
| Barbara J Bradley 2007-10-16, 6:22 pm |
|
"Spandex Rutabaga" <SpRu@agabatur.xednaps> wrote in message
news:4713E5AA.D1566E07@agabatur.xednaps...
> Barbara J Bradley wrote:
>
>
> Yes, it has the same effect but produces different results.
>
>
> The PDF is attached.
Thanks so much . . your experiments are always thorough and reproducible
but you omitted the water pressure on the baga in the first image. With no
lungs to collapse, where do the 'glugs' come from? ;) I'm afraid Mars is
too far away (I would have to drive to the store) to reproduce that part of
the experiment.
| |
| Spandex Rutabaga 2007-10-16, 6:22 pm |
| Barbara J Bradley wrote:
> Thanks so much . . your experiments are always thorough and reproducible
> but you omitted the water pressure on the baga in the first image. With no
> lungs to collapse, where do the 'glugs' come from? ;)
Air trapped between my skin and its waxy coating :) Besides,
being a 'baga doesn't preclude also being a windbag :)
> I'm afraid Mars is
> too far away (I would have to drive to the store) to reproduce that part of
> the experiment.
Traveling through space is such an inconvenience :( This should
be closer than Mars though: http://tinyurl.com/2cyfpq (check the
mileage here: http://en.wikipedia.org/wiki/Venus#Orbit_and_rotation).
| |
| Barbara J Bradley 2007-10-17, 3:18 am |
|
"Spandex Rutabaga" <SpRu@agabatur.xednaps> wrote in message
news:4715100B.3A028A4B@agabatur.xednaps...
> Barbara J Bradley wrote:
>
>
> Air trapped between my skin and its waxy coating :) Besides,
> being a 'baga doesn't preclude also being a windbag :)
Your various attributes are amazing . . crafty and a windbag!
>
> Traveling through space is such an inconvenience :( This should
> be closer than Mars though: http://tinyurl.com/2cyfpq (check the
> mileage here: http://en.wikipedia.org/wiki/Venus#Orbit_and_rotation).
Thanks, but I will stick with the Ground-based Research.
|
|
|
| | Copyright 2003 - 2009 forum4designers.com Software forum Computer Hardware reviews |
|