This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > PainShop Pro 9 > July 2007 > Odd behavior with 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 Odd behavior with script
Alyce Addertongue

2007-07-03, 6:28 pm


I wrote two very simple scripts: one rotates the selected image 90 degrees
(cw) and saves it, the other rotates it the other way (cc) and saves. I put
these scripts in the Scripts-Trusted folder.

When I select the script from the drop-down list and click on the "Run
Selected Script" button (the one on the left), the image rotates but an
error dialogue intervenes, saying the script is attempting to perform an
illegal action (the FileSave command), and should be run from the
Scripts-Trusted folder (where, as far as I can tell, it already is). I then
have to close the dialogue and manually open the File>Save command to
complete the action. Four clicks.

However, if I click on the "Run Script" button (the one on the right end), a
selection box opens with the script already highlighted, and I simply click
"Okay" and it runs fine. Two clicks. Another curiosity immediately appears,
however, in that the "Scripts-Trusted" list that appears only contains the
two scripts that I wrote, no others, while the drop-down box on the left of
the first button shows those two plus about 12 others included by Jasc.
Both lists purport to be the Scripts-Trusted folders.

Question one: how can I "fix" the first error so I can perform the action(s)
with a single click, and two, why can't I see the full list in the second
box?

~AA
PSP 9.01
WinXPHome



Trev

2007-07-03, 6:28 pm



"Alyce Addertongue" <no.reply@all.com> wrote in message
news:468940a2_3@cnews...
>
> I wrote two very simple scripts: one rotates the selected image 90 degrees
> (cw) and saves it, the other rotates it the other way (cc) and saves. I
> put these scripts in the Scripts-Trusted folder.
>
> When I select the script from the drop-down list and click on the "Run
> Selected Script" button (the one on the left), the image rotates but an
> error dialogue intervenes, saying the script is attempting to perform an
> illegal action (the FileSave command), and should be run from the
> Scripts-Trusted folder (where, as far as I can tell, it already is). I
> then have to close the dialogue and manually open the File>Save command to
> complete the action. Four clicks.
>
> However, if I click on the "Run Script" button (the one on the right end),
> a selection box opens with the script already highlighted, and I simply
> click "Okay" and it runs fine. Two clicks. Another curiosity immediately
> appears, however, in that the "Scripts-Trusted" list that appears only
> contains the two scripts that I wrote, no others, while the drop-down box
> on the left of the first button shows those two plus about 12 others
> included by Jasc. Both lists purport to be the Scripts-Trusted folders.
>
> Question one: how can I "fix" the first error so I can perform the
> action(s) with a single click, and two, why can't I see the full list in
> the second box?
>
> ~AA
> PSP 9.01
> WinXPHome

well for the latter bit there will be two scripts trusted folders one in
the program files for items distributed with the program and the other is in
the my PSP folder in my documents. This is for items that you have created
or downloaded. This folder will not be removed or its content if you remove
the program, so by saving you from loosing all.



JoeB

2007-07-03, 6:28 pm


"Alyce Addertongue" <no.reply@all.com> wrote in news:468940a2_3@cnews:

>
> I wrote two very simple scripts: one rotates the selected image 90
> degrees (cw) and saves it, the other rotates it the other way (cc) and
> saves. I put these scripts in the Scripts-Trusted folder.
>
> When I select the script from the drop-down list and click on the "Run
> Selected Script" button (the one on the left), the image rotates but
> an error dialogue intervenes, saying the script is attempting to
> perform an illegal action (the FileSave command), and should be run
> from the Scripts-Trusted folder (where, as far as I can tell, it
> already is). I then have to close the dialogue and manually open the
> File>Save command to complete the action. Four clicks.
>


> However, if I click on the "Run Script" button (the one on the right
> end), a selection box opens with the script already highlighted, and I
> simply click "Okay" and it runs fine. Two clicks. Another curiosity
> immediately appears, however, in that the "Scripts-Trusted" list that
> appears only contains the two scripts that I wrote, no others, while
> the drop-down box on the left of the first button shows those two plus
> about 12 others included by Jasc. Both lists purport to be the
> Scripts-Trusted folders.
>
> Question one: how can I "fix" the first error so I can perform the
> action(s) with a single click, and two, why can't I see the full list
> in the second box?
>



You have two folder for all resources, including Scripts Trusted. The
first folder is under the Jasc Software>PSP9 folder in the Program Files
folder, and is where PSP installed resources that came with the program.
The second set of folders with identical names is in My Documents>My PSP
Files. This is where you are supposed to store resources you create
yourself of get from other sources. If you uninstall and re-install PSP
for some reason, the uninstall will remove the folders from Program
Files but not from My Documents, therefore ensuring that you don't lose
the third party resources during an uninstall.

When you save a script or resource you create, PSP automatically selects
the My Documents>My PSP Files folder and its subfolders for saving the
resource. So your two created scripts show up there, and when you click
the Run Script button (the one with the folder) you are seeing the
folder in My PSP Files, which only contains those two scripts. You can
browse in that dialogue to any folder in My PSP Files or under the PSP9
folder in Program Files.

When you click the dropdown list arrow, however, there is a Category
dropdown list at the top. It defaults to All, and therefore you are
seeing the scripts in all scripts folder, whether trusted, restricted,
in My PSP Files or PSP9 file folders. If you select Scripts Trusted as
the catefory you're seeing whats in the My PSP Files Scripts Trusted
folder and the PSP9>Scripts Trusted folder, which is why you see both
your scripts and the ones provided by Jasc.

Also, PSP will look for the first version of the script it finds. If it
turnes out that you also have a copy of the script in the Scripts
Restricted folder then that is the copy that will be run. Check both of
your Scripts Restricted folders to make sure they do not contain a copy
of the script.

Regards,

JoeB

Alyce Addertongue

2007-07-03, 6:28 pm


Thank you both for the quick responses. I found the miscreant script in the
MyPSPFiles>Scripts-Restricted folder, and deleted it. Seems to work fine
now. :-)

~AA




JoeB

2007-07-03, 10:17 pm


"Alyce Addertongue" <no.reply@all.com> wrote in news:46895736$1_2@cnews:

>
> Thank you both for the quick responses. I found the miscreant script
> in the MyPSPFiles>Scripts-Restricted folder, and deleted it. Seems to
> work fine now. :-)
>
> ~AA


Glad you fixed it. It sounded like an issue of having a duplicate script
with the same name hanging around that PSP decided to use first :-)

Regards,

JoeB

Sponsored Links


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