This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > PainShop Pro Scripting > January 2007 > Command line parameters





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 Command line parameters
Rene Beaupoil

2007-01-10, 8:50 pm

Hi there,

I need to invoke a PSP script from another application. Does anybody know,
if it is possible to get command line parameters in a PSP X script?

Thanks in advance,
Rene

--
"They say if you play the Windows XP CD backward, you can hear satanic
words."

"Oh, thatīs nothing. If you play it forward it installs Windows XP...!"


Spandex Rutabaga

2007-01-10, 8:50 pm

Rene Beaupoil wrote:
>
> Hi there,
>
> I need to invoke a PSP script from another application. Does anybody know,
> if it is possible to get command line parameters in a PSP X script?


PSP scripts use the Python language so you can extend them with
standard Python stuff. Command line parameters can be obtained
from the argv list imported from the sys module in Python. Check
out this link: http://tinyurl.com/y83ceu. More information and
examples at:
http://www.python.org/doc/1.5/lib/node28.html
http://www.python.org/doc/2.4.4/tut/node4.html
http://www.python.org/doc/ext/run-func.txt
Rene Beaupoil

2007-01-10, 8:50 pm

Thanks for the input,

but I knew that already. The problem is that in a PSP script (extension
..pspscript) i get an empty string and "/dde" as arguments. In a Python
script (extension .py) I can't use the PSP functions since "from PSPApp
import *" does not work...

Have a nice day, Rene



"Spandex Rutabaga" <SpRu@agabatur.xednaps> wrote in message
news:458AB6A5.407B8391@agabatur.xednaps...
> Rene Beaupoil wrote:
know,[color=darkred]
>
> PSP scripts use the Python language so you can extend them with
> standard Python stuff. Command line parameters can be obtained
> from the argv list imported from the sys module in Python. Check
> out this link: http://tinyurl.com/y83ceu. More information and
> examples at:
> http://www.python.org/doc/1.5/lib/node28.html
> http://www.python.org/doc/2.4.4/tut/node4.html
> http://www.python.org/doc/ext/run-func.txt



Spandex Rutabaga

2007-01-10, 8:50 pm

Rene Beaupoil wrote:
>
> Thanks for the input,
>
> but I knew that already. The problem is that in a PSP script (extension
> .pspscript) i get an empty string and "/dde" as arguments. In a Python
> script (extension .py) I can't use the PSP functions since "from PSPApp
> import *" does not work...


You could try the ugly way. Put the parameters in a file and
then read them using the PSP script. You could do this all with
a Python script that stores the parameters and then calls a
PSP script that reads the parameters and acts on them.
Sponsored Links


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