| | |
PSP9 Script
Please support our Graphics and Multimedia advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Apr 2008
Posts: 41
Reputation:
Solved Threads: 1
I'm an amateur photographer, and I'd like to use a script in PSP9 to automatically add an identical copyright to each of my images when working on them for web display.
I had adapted a script I've previously received to add my own text, and also ensure it is 50% opacity, but I don't know how to position the text to the center of the canvas, within the same script.
The current script is like this:
Any thoughts? Many thanks in advance, Charlie.
I had adapted a script I've previously received to add my own text, and also ensure it is 50% opacity, but I don't know how to position the text to the center of the canvas, within the same script.
The current script is like this:
Graphics and Multimedia Syntax (Toggle Plain Text)
from JascApp import * import JascUtils def ScriptProperties(): return { 'Author': u'Charlotte Dolby', 'Copyright': u'© www.equinefocus.co.uk', 'Description': u'www.equinefocus.co.uk', 'Host': u'Paint Shop Pro 9', 'Host Version': u'9.01' } def Do(Environment): # EnableOptimizedScriptUndo App.Do( Environment, 'EnableOptimizedScriptUndo', { 'GeneralSettings': { 'ExecutionMode': App.Constants.ExecutionMode.Default, 'AutoActionMode': App.Constants.AutoActionMode.Match, 'Version': ((9,0,1),1) } }) # ---------- # INIT if JascUtils.RequireADoc( Environment ) == False: return if not JascUtils.IsTrueColor(Environment, App.TargetDocument): # IncreaseColorsTo16Million App.Do( Environment, 'IncreaseColorsTo16Million', { 'GeneralSettings': { 'ExecutionMode': App.Constants.ExecutionMode.Silent, 'AutoActionMode': App.Constants.AutoActionMode.Match, 'Version': ((9,0,1),1) } }) # INIT # ---------- # ---------- # DIALOG BOXES Result = App.Do( Environment, 'GetNumber', { 'DefaultValue': 2, 'MinValue': 1, 'MaxValue': 3, 'DialogTitle': 'Select Copyright Position', 'Prompt': '1) Left 2) Center 3) Right', 'GetInteger': True, 'GeneralSettings': { 'ExecutionMode': App.Constants.ExecutionMode.Interactive } }) if Result[ 'OKButton' ] == 0: raise SystemExit # Cancel Button if Result[ 'EnteredNumber' ] == 1: myposition = 10 myjustify = App.Constants.Justify.Left elif Result[ 'EnteredNumber' ] == 2: myposition = (App.ActiveDocument.Width +1) /2 myjustify = App.Constants.Justify.Center elif Result[ 'EnteredNumber' ] == 3: myposition = App.ActiveDocument.Width-10 myjustify = App.Constants.Justify.Right # ---------- Result2 = App.Do( Environment, 'GetString', { 'DefaultText': '© www.equinefocus.co.uk', 'DialogTitle': 'Copyright Text', 'Prompt': 'Enter Text', 'MaxLength': 25, 'GeneralSettings': { 'ExecutionMode': App.Constants.ExecutionMode.Interactive } }) mytext = Result2[ 'EnteredText' ] # ---------- Result3 = App.Do( Environment, 'GetNumber', { 'DefaultValue': 16, 'MinValue': 10, 'MaxValue': 250, 'DialogTitle': 'Copyright Text', 'Prompt': 'Font Size', 'GetInteger': True, 'GeneralSettings': { 'ExecutionMode': App.Constants.ExecutionMode.Interactive } }) myfont = Result3[ 'EnteredNumber' ] # DIALOG BOXES # ---------- # Text App.Do( Environment, 'TextEx', { 'Visibility': True, 'CreateAs': App.Constants.CreateAs.Floating, 'Start': (myposition, App.ActiveDocument.Height-(myfont)/2), 'TextFlow': App.Constants.TextFlow.HorizontalDown, 'TextType': App.Constants.TextType.TextBase, 'Matrix': [ 1, 0, 0, 0, 1, 0, 0, 0, 1 ], 'AutoKern': True, 'Kerning': 0, 'Tracking': 0, 'Leading': 0, 'Font': u'Arial', 'PointSize': myfont, 'Italic': False, 'Bold': False, 'Underline': False, 'Strikethru': False, 'AntialiasStyle': App.Constants.AntialiasEx.Sharp, 'WarpText': True, 'SetText': myjustify, 'Fill': None, 'Stroke': None, 'LineWidth': 0, 'LineStyle': { 'Name': u'', 'FirstCap': (u'',0.25,0.25), 'LastCap': (u'',0.25,0.25), 'FirstSegCap': (u'',0.25,0.25), 'LastSegCap': (u'',0.25,0.25), 'UseSegmentCaps': False, 'Segments': [] }, 'Join': App.Constants.JointStyle.Miter, 'MiterLimit': 10, 'Characters': mytext, 'Strings': None, 'TextTarget': (0,0,[1],False), 'PathTarget': None, 'GeneralSettings': { 'ExecutionMode': App.Constants.ExecutionMode.Default, 'AutoActionMode': App.Constants.AutoActionMode.Match, 'Version': ((9,0,1),1) } }) # SelectNone App.Do( Environment, 'SelectNone', { 'GeneralSettings': { 'ExecutionMode': App.Constants.ExecutionMode.Default, 'AutoActionMode': App.Constants.AutoActionMode.Match, 'Version': ((9,0,1),1) } })
Any thoughts? Many thanks in advance, Charlie.
![]() |
Similar Threads
- Yikes! Lost File & Program Associations! W2K (Windows NT / 2000 / XP)
- script virus?? - Lost file & Program associations (Viruses, Spyware and other Nasties)
Other Threads in the Graphics and Multimedia Forum
- Previous Thread: Open source for video tutorial
- Next Thread: Missing Images in swf file in dreamweaver
| Thread Tools | Search this Thread |
Tag cloud for Graphics and Multimedia
3d 10 actionscript3 adobe adobeacrobat adobereader air ajax amazon amf apple button cart childprotection cloud dashboard dell design dojofoundation dreamweaver ebay eclipse ecommerce elasticcomputecloud embed endorsement extra family flash flash-develop flashlite flex free harddrive iamthwee ibm illustrator imflash intel interactivemap javafx javascript laptop legal map micron microsoft mobile monitoringsoftware moonlight multimedia myspace nand news novell panorama pdf pedophiles photoshop photosynth php safety sandisk security shopping silverlight solidstatedrive sproutcore ssd streaming swf table ukmap unload unwanted video vulnerability web white.space xml zend zephyr zeroday





