1. Selects the Select > Rectangle tool .
2. Clicks the Backround/Fill square in the Materials palette and chooses White, replacing whatever was already set.
3. Selects a rectangle around text I want to remove.
4. Presses the Delete key.
But the script doesn't record the selected colour. So if it was say green, then the script results in a green rectangle replacing the text.
Here's an example script. (I'm still using PSP 8.)
Code: Select all
from JascApp import *
def ScriptProperties():
return {
'Author': u'',
'Copyright': u'',
'Description': u'',
'Host': u'Paint Shop Pro',
'Host Version': u'8.10'
}
def Do(Environment):
# EnableOptimizedScriptUndo
App.Do( Environment, 'EnableOptimizedScriptUndo', {
})
# Selection
App.Do( Environment, 'Selection', {
'General': {
'Mode': App.Constants.SelectionOperation.Replace,
'Antialias': App.Constants.Boolean.false,
'Feather': 0
},
'SelectionShape': App.Constants.SelectionShape.Rectangle,
'Start': (436,0),
'End': (912,27),
'GeneralSettings': {
'ExecutionMode': App.Constants.ExecutionMode.Default,
'AutoActionMode': App.Constants.AutoActionMode.Match
}
})
# ClearSelection
App.Do( Environment, 'ClearSelection', {
'GeneralSettings': {
'ExecutionMode': App.Constants.ExecutionMode.Default,
'AutoActionMode': App.Constants.AutoActionMode.Match
}
})
# SelectNone
App.Do( Environment, 'SelectNone', {
'GeneralSettings': {
'ExecutionMode': App.Constants.ExecutionMode.Default,
'AutoActionMode': App.Constants.AutoActionMode.Match
}
})
