For example, instead of this script entering My text, I want it to enter whatever I've pasted to the clipboard:
Code: Select all
from JascApp import *
def ScriptProperties():
return {
'Author': u'Terry Pinnell',
'Copyright': u'',
'Description': u'',
'Host': u'Paint Shop Pro',
'Host Version': u'8.10'
}
def Do(Environment):
# EnableOptimizedScriptUndo
App.Do( Environment, 'EnableOptimizedScriptUndo', {
})
# Text
App.Do( Environment, 'Text', {
'CreateAs': App.Constants.CreateAs.Vector,
'Segments': [{
'Bold': App.Constants.Boolean.true,
'Fill': {
'Color': (0,0,0),
'Pattern': None,
'Gradient': None,
'Texture': None,
'Identity': u'Material'
},
'Font': u'Arial',
'LineStyle': {
'Name': u'',
'FirstCap': (u'Butt',0.25,0.25),
'LastCap': (u'Butt',0.25,0.25),
'FirstSegCap': (u'',0.25),
'LastSegCap': (u'',0.25),
'UseSegmentCaps': App.Constants.Boolean.false,
'Segments': []
},
'LineWidth': 0,
'PointSize': 18,
'SetText': App.Constants.Justify.Center,
'Start': (17.5,175.5),
'Stroke': {
'Color': (255,255,220),
'Pattern': None,
'Gradient': None,
'Texture': None,
'Identity': u'Material'
}
},{
'Antialias': App.Constants.Boolean.true,
'WarpText': App.Constants.Boolean.true,
'AutoKern': App.Constants.Boolean.true,
'Bold': App.Constants.Boolean.true,
'Kerning': 0,
'Leading': 0,
'Fill': {
'Color': (0,0,0),
'Pattern': None,
'Gradient': None,
'Texture': None,
'Identity': u'Material'
},
'Font': u'Arial',
'Italic': App.Constants.Boolean.false,
'Join': App.Constants.JointStyle.Miter,
'LineStyle': {
'Name': u'',
'FirstCap': (u'Butt',0.25,0.25),
'LastCap': (u'Butt',0.25,0.25),
'FirstSegCap': (u'',0.25),
'LastSegCap': (u'',0.25),
'UseSegmentCaps': App.Constants.Boolean.false,
'Segments': []
},
'LineWidth': 0,
'MiterLimit': 10,
'PointSize': 18,
'SetText': App.Constants.Justify.Left,
'Start': (17.5,175.5),
'Strikethru': App.Constants.Boolean.false,
'Stroke': {
'Color': (255,255,220),
'Pattern': None,
'Gradient': None,
'Texture': None,
'Identity': u'Material'
},
'Underline': App.Constants.Boolean.false
},{
'Characters': u'My text'
}],
'SavedText': None,
'FinalApply': App.Constants.Boolean.false,
'Matrix': None,
'GeneralSettings': {
'ExecutionMode': App.Constants.ExecutionMode.Default,
'AutoActionMode': App.Constants.AutoActionMode.Match
}
})
Terry, East Grinstead, UK
