This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > PainShop Pro Scripting > June 2006 > Running script on multiple documents





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 Running script on multiple documents
Big Bad Dave

2006-06-03, 7:29 pm

'Morning all...

What I'd like to do is to be able to select one or more images in the
brower, then run a particular script on them all at the press of a key
instead of having to do "File >> Batch... >> Process... >> select the
script... blah blah blah". I've bound the script that I want to run to a
function key, but I can't seem to work out a way of the passing the script
the list of documents selected in the browser. I've even tried adding the
bound script to the browser context menu so that it's run when I right-click
on the image.

I could always open all the documents, and modify the script to iterate
through the App.Documents list, but I'd rather it operated in proper batch
mode (it's faster).

Have any of you clever people got any suggestions?

Thanks

Dave


Howard Dickson

2006-06-03, 7:29 pm

Big Bad Dave wrote:
> 'Morning all...
>
> What I'd like to do is to be able to select one or more images in the
> brower, then run a particular script on them all at the press of a key
> instead of having to do "File >> Batch... >> Process... >> select the
> script... blah blah blah". I've bound the script that I want to run to a
> function key, but I can't seem to work out a way of the passing the script
> the list of documents selected in the browser. I've even tried adding the
> bound script to the browser context menu so that it's run when I right-click
> on the image.
>
> I could always open all the documents, and modify the script to iterate
> through the App.Documents list, but I'd rather it operated in proper batch
> mode (it's faster).
>
> Have any of you clever people got any suggestions?
>
> Thanks
>
> Dave
>
>

Dave,

You can do all that from within the Batch/Process dialog.

Just click the Browse button, and select all the files you want to be
processed, which then get added to the 'Files to Process' list. Then
tick the 'Use Script' box and select your script from the dropdown menu.
Choose your file type and destination folder, and click Start.

Or am I missing something? :)

Rgds,
Howard
--

---oooOOOooo---

Sheilsoft
ComputerSystems

www.sheilsoft.com

---oooOOOooo---
Big Bad Dave

2006-06-03, 7:29 pm

Thanks Howard. I already knew that. I'm trying to avoid having to open the
batch processing dialog at all. I want to be able to just select the files
and hit F2 (which I've set up to run the bound script). When I try it, it
the App.Documents list is empty. What I need to know is whether there is
something like App.SelectList.

Dave

"Howard Dickson" <howard@REMOVEsheilsoft.com> wrote in message
news:448147ad$1_1@cnews...
> Big Bad Dave wrote:
> Dave,
>
> You can do all that from within the Batch/Process dialog.
>
> Just click the Browse button, and select all the files you want to be
> processed, which then get added to the 'Files to Process' list. Then tick
> the 'Use Script' box and select your script from the dropdown menu. Choose
> your file type and destination folder, and click Start.
>
> Or am I missing something? :)
>
> Rgds,
> Howard
> --
>
> ---oooOOOooo---
>
> Sheilsoft
> ComputerSystems
>
> www.sheilsoft.com
>
> ---oooOOOooo---



Joske

2006-06-03, 7:29 pm

Big Bad Dave wrote:

> Thanks Howard. I already knew that. I'm trying to avoid having
> to open the batch processing dialog at all. I want to be able to
> just select the files and hit F2 (which I've set up to run the
> bound script). When I try it, it the App.Documents list is
> empty. What I need to know is whether there is something like
> App.SelectList.


Is Open with Options, Enable Pre-processing of any use to you?

Select the thumbnail(s), then rightclick and choose Open with
Options. Check Enable Pre-processing and pick a script.

I found however while recording this whole process that the Enable
Pre-processing won't stay checked. It won't either when going File,
Open. Otherwise it would be simply a matter of this:

# OpenWithOptions
App.Do( Environment, 'OpenWithOptions', {
'GeneralSettings': {
'ExecutionMode': App.Constants.ExecutionMode.Silent,
'AutoActionMode':
App.Constants.AutoActionMode.Match,
'Version': ((10,0,3),1)
}
})

# RunScript
App.Do( Environment, 'RunScript', {
'FileName': 'name of the preprocessing script',
'ScriptExecutionMode':
App.Constants.ExecutionMode.Silent,
'CheckVersion': True,
'GeneralSettings': {
'ExecutionMode': App.Constants.ExecutionMode.Silent,
'PreviewVisible': False,
'AutoActionMode':
App.Constants.AutoActionMode.Match,
'Version': ((10,0,3),1)
}
})

# SelectDocument
App.Do( Environment, 'SelectDocument', {
'SelectedImage': 0,
'Strict': False,
'GeneralSettings': {
'ExecutionMode':
App.Constants.ExecutionMode.Default,
'AutoActionMode':
App.Constants.AutoActionMode.Match,
'Version': ((10,0,3),1)
}
})

Joske
--
http://members.home.nl/j.a.c.backer/



Big Bad Dave

2006-06-03, 7:29 pm

I think OpenWithOptions must be a PSP-X function because it's not described
in the PSP-9 documentation.

Dave

"Joske" <j.backer@home.nl> wrote in message news:44815a03$1_3@cnews...
> Big Bad Dave wrote:
>
>
> Is Open with Options, Enable Pre-processing of any use to you?
>
> Select the thumbnail(s), then rightclick and choose Open with
> Options. Check Enable Pre-processing and pick a script.
>
> I found however while recording this whole process that the Enable
> Pre-processing won't stay checked. It won't either when going File,
> Open. Otherwise it would be simply a matter of this:
>
> # OpenWithOptions
> App.Do( Environment, 'OpenWithOptions', {
> 'GeneralSettings': {
> 'ExecutionMode': App.Constants.ExecutionMode.Silent,
> 'AutoActionMode':
> App.Constants.AutoActionMode.Match,
> 'Version': ((10,0,3),1)
> }
> })
>
> # RunScript
> App.Do( Environment, 'RunScript', {
> 'FileName': 'name of the preprocessing script',
> 'ScriptExecutionMode':
> App.Constants.ExecutionMode.Silent,
> 'CheckVersion': True,
> 'GeneralSettings': {
> 'ExecutionMode': App.Constants.ExecutionMode.Silent,
> 'PreviewVisible': False,
> 'AutoActionMode':
> App.Constants.AutoActionMode.Match,
> 'Version': ((10,0,3),1)
> }
> })
>
> # SelectDocument
> App.Do( Environment, 'SelectDocument', {
> 'SelectedImage': 0,
> 'Strict': False,
> 'GeneralSettings': {
> 'ExecutionMode':
> App.Constants.ExecutionMode.Default,
> 'AutoActionMode':
> App.Constants.AutoActionMode.Match,
> 'Version': ((10,0,3),1)
> }
> })
>
> Joske
> --
> http://members.home.nl/j.a.c.backer/
>
>
>



Joske

2006-06-03, 7:29 pm

Big Bad Dave wrote:
> "Joske" wrote
[color=darkred]
[color=darkred]
[color=darkred]
> I think OpenWithOptions must be a PSP-X function because it's not
> described in the PSP-9 documentation.


There are posts in the X group by you indicating you are using X.
You didn't mention this question was about 9.

Yes, it's an X function. There is nothing in the Command API for X
about it however.

Joske






Big Bad Dave

2006-06-03, 7:29 pm

Sorry Joske. I do keep an eye on the X group even though I'm still a 9
user. I'm waiting until the consensus to be that X has become better than
9. At the moment, there are still lots of messages from people saying that
although they have X, they still use 9 for real work!

Dave

"Joske" <j.backer@home.nl> wrote in message news:44816f46$1_3@cnews...
> Big Bad Dave wrote:
>
>
>
>
> There are posts in the X group by you indicating you are using X.
> You didn't mention this question was about 9.
>
> Yes, it's an X function. There is nothing in the Command API for X
> about it however.
>
> Joske
>
>
>
>
>
>



David A. Belew

2006-06-08, 7:39 pm


"Big Bad Dave" <dave@hotmail.com> wrote in message news:4481ac25_1@cnews...
> Sorry Joske. I do keep an eye on the X group even though I'm still a 9
> user. I'm waiting until the consensus to be that X has become better than
> 9. At the moment, there are still lots of messages from people saying
> that although they have X, they still use 9 for real work!
>
> Dave
>
> "Joske" <j.backer@home.nl> wrote in message news:44816f46$1_3@cnews...

Although I still have 8 & 9 on my computer, I rarely use them.

--
Dave Belew
C-Tech Volunteer
Corel PSPX Private beta tester

http://ntweb.mcn.org/dbelew/[color=darkred]
>
>



Sponsored Links


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