|
| Re: Using the Windows Clipboard within scripts |
 |
Thu, 17 Apr 2008 12:20:25 -040 |
I don't have time to get into many details as I am leaving on vacation
within the hour - but there IS a way to pass information during a PSP
script, using the Script Data Communication Area. Check out the tutorial I
wrote on the topic - you can find it here:
http://suzshook.topcities.com/tutorials/9scriptdata/index.htm
Hope this helps, Puma. Once you get the hang of using this facility, the
sky's the limit! Suz
Puma Noir wrote:
> Hi,
>
> (PSP9 - WinXP SP2)
>
> I have a script that computes a literal string that I want to put into
> the Windows Clipboard, for use later as a name of a Preset Name for
> the perspective tool (pasting this string into the dialog window
> "Save Preset").
> The version of Python installed with PSP9 does't offer the capapility
> to manipulate the Windows Clipboard (it's possible, but only with
> selections from the selected document via PSP commands, not with a
> text value of a script variable).
>
> I have installed the complete Python 2.3.5 and the "Python for
Windows
> extensions" containing the "win32clipboard" module, and I
have
> transfered the concerning files into the "Python Libraries" of
the PSP
> folder, but the instruction :
>
> from win32clipboard import *
>
>
> crashes PSP :-(
>
> Does anyone know a manner to put the text of a script variable within
> the clipboard for future use ?
>
> In fact, originaly, I want to read the 8 coordinates (x and y) of the
> four handles of the bounding box of the Perspective Correction Tool,
> for use within a script (I want this coordinates before applying the
> tool to do other actions). A way to do this is to save the current
> bounding
> box in a preset, and later read the corresponding script file. Another way
> is to apply the tool, cancel it, et read the last action from the
> history, also written as a script. In both solutions, I have to read a
> PSP script corresponding to the apply of the tool. Is there a solution
> to get the coordinates "directly" within a script, without
applying
> the tool nor saving the preset ? This coordinates are on the screen,
> in front of my eyes, but I can't get them from a script. Arghhh !
>
> (I am working on all the pages of many scanned old books, and I repeat
> this action on all the pages. I am interessed to find a
> hight-automatized way (ie with scripts) to work on each page, reducing
> manuals steps).
>
> If anyone have a idea...
>
> Thank's a lot.
|
| Post Reply
|
| Using the Windows Clipboard within scripts |
 |
Thu, 17 Apr 2008 15:23:35 +020 |
Hi,
(PSP9 - WinXP SP2)
I have a script that computes a literal string that I want to put into
the Windows Clipboard, for use later as a name of a Preset Name for the
perspective tool (pasting this string into the dialog window "Save
Preset").
The version of Python installed with PSP9 does't offer the capapility to
manipulate the Windows Clipboard (it's possible, but only with
selections from the selected document via PSP commands, not with a text
value of a script variable).
I have installed the complete Python 2.3.5 and the "Python for Windows
extensions" containing the "win32clipboard" module, and I have
transfered the concerning files into the "Python Libraries" of the PSP
folder, but the instruction :
from win32clipboard import *
crashes PSP :-(
Does anyone know a manner to put the text of a script variable within
the clipboard for future use ?
In fact, originaly, I want to read the 8 coordinates (x and y) of the
four handles of the bounding box of the Perspective Correction Tool, for
use within a script (I want this coordinates before applying the tool to
do other actions). A way to do this is to save the current bounding box
in a preset, and later read the corresponding script file. Another way
is to apply the tool, cancel it, et read the last action from the
history, also written as a script. In both solutions, I have to read a
PSP script corresponding to the apply of the tool. Is there a solution
to get the coordinates "directly" within a script, without applying
the
tool nor saving the preset ? This coordinates are on the screen, in
front of my eyes, but I can't get them from a script. Arghhh !
(I am working on all the pages of many scanned old books, and I repeat
this action on all the pages. I am interessed to find a
hight-automatized way (ie with scripts) to work on each page, reducing
manuals steps).
If anyone have a idea...
|
| Post Reply
|
| Re: Using the Windows Clipboard within scripts |
 |
Thu, 17 Apr 2008 18:58:25 +020 |
Yes SuzShook, I well know the ScriptData Communication Area, I founded
it precisely on your site. Many thank's.
The SDCA is useful to transmit an information from a script to another
script within the same PSP session (for a session to another session, I
use the Windows Registry). But I want get a value issued by a script to
put them "manualy" in a dialog box using the Paste command (ctrl+V).
The
SDCA is not available ouside scripts.
SuzShook a écrit :
> I don't have time to get into many details as I am leaving on vacation
> within the hour - but there IS a way to pass information during a PSP
> script, using the Script Data Communication Area. Check out the tutorial I
> wrote on the topic - you can find it here:
>
> http://suzshook.topcities.com/tutorials/9scriptdata/index.htm
>
> Hope this helps, Puma. Once you get the hang of using this facility, the
> sky's the limit! Suz
|
| Post Reply
|
|
|