Reply

Join Date: Apr 2008
Posts: 39
Reputation: Borderline is an unknown quantity at this point 
Solved Threads: 1
Borderline Borderline is offline Offline
Light Poster

PSP9 Script

 
0
  #1
Mar 22nd, 2009
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:

Graphics and Multimedia Syntax (Toggle Plain Text)
  1. from JascApp import *
  2. import JascUtils
  3.  
  4. def ScriptProperties():
  5. return {
  6. 'Author': u'Charlotte Dolby',
  7. 'Copyright': u'© www.equinefocus.co.uk',
  8. 'Description': u'www.equinefocus.co.uk',
  9. 'Host': u'Paint Shop Pro 9',
  10. 'Host Version': u'9.01'
  11. }
  12.  
  13. def Do(Environment):
  14. # EnableOptimizedScriptUndo
  15. App.Do( Environment, 'EnableOptimizedScriptUndo', {
  16. 'GeneralSettings': {
  17. 'ExecutionMode': App.Constants.ExecutionMode.Default,
  18. 'AutoActionMode': App.Constants.AutoActionMode.Match,
  19. 'Version': ((9,0,1),1)
  20. }
  21. })
  22.  
  23. # ----------
  24. # INIT
  25.  
  26. if JascUtils.RequireADoc( Environment ) == False: return
  27.  
  28. if not JascUtils.IsTrueColor(Environment, App.TargetDocument):
  29.  
  30. # IncreaseColorsTo16Million
  31. App.Do( Environment, 'IncreaseColorsTo16Million', {
  32. 'GeneralSettings': {
  33. 'ExecutionMode': App.Constants.ExecutionMode.Silent,
  34. 'AutoActionMode': App.Constants.AutoActionMode.Match,
  35. 'Version': ((9,0,1),1)
  36. }
  37. })
  38.  
  39. # INIT
  40. # ----------
  41. # ----------
  42. # DIALOG BOXES
  43.  
  44. Result = App.Do( Environment, 'GetNumber', {
  45. 'DefaultValue': 2,
  46. 'MinValue': 1,
  47. 'MaxValue': 3,
  48. 'DialogTitle': 'Select Copyright Position',
  49. 'Prompt': '1) Left 2) Center 3) Right',
  50. 'GetInteger': True,
  51. 'GeneralSettings': {
  52. 'ExecutionMode': App.Constants.ExecutionMode.Interactive
  53. }
  54. })
  55.  
  56. if Result[ 'OKButton' ] == 0: raise SystemExit # Cancel Button
  57.  
  58. if Result[ 'EnteredNumber' ] == 1:
  59. myposition = 10
  60. myjustify = App.Constants.Justify.Left
  61. elif Result[ 'EnteredNumber' ] == 2:
  62. myposition = (App.ActiveDocument.Width +1) /2
  63. myjustify = App.Constants.Justify.Center
  64. elif Result[ 'EnteredNumber' ] == 3:
  65. myposition = App.ActiveDocument.Width-10
  66. myjustify = App.Constants.Justify.Right
  67.  
  68. # ----------
  69.  
  70. Result2 = App.Do( Environment, 'GetString', {
  71. 'DefaultText': '© www.equinefocus.co.uk',
  72. 'DialogTitle': 'Copyright Text',
  73. 'Prompt': 'Enter Text',
  74. 'MaxLength': 25,
  75. 'GeneralSettings': {
  76. 'ExecutionMode': App.Constants.ExecutionMode.Interactive
  77. }
  78. })
  79.  
  80. mytext = Result2[ 'EnteredText' ]
  81.  
  82. # ----------
  83.  
  84. Result3 = App.Do( Environment, 'GetNumber', {
  85. 'DefaultValue': 16,
  86. 'MinValue': 10,
  87. 'MaxValue': 250,
  88. 'DialogTitle': 'Copyright Text',
  89. 'Prompt': 'Font Size',
  90. 'GetInteger': True,
  91. 'GeneralSettings': {
  92. 'ExecutionMode': App.Constants.ExecutionMode.Interactive
  93. }
  94. })
  95.  
  96. myfont = Result3[ 'EnteredNumber' ]
  97.  
  98. # DIALOG BOXES
  99. # ----------
  100.  
  101. # Text
  102. App.Do( Environment, 'TextEx', {
  103. 'Visibility': True,
  104. 'CreateAs': App.Constants.CreateAs.Floating,
  105. 'Start': (myposition, App.ActiveDocument.Height-(myfont)/2),
  106. 'TextFlow': App.Constants.TextFlow.HorizontalDown,
  107. 'TextType': App.Constants.TextType.TextBase,
  108. 'Matrix': [
  109. 1,
  110. 0,
  111. 0,
  112. 0,
  113. 1,
  114. 0,
  115. 0,
  116. 0,
  117. 1
  118. ],
  119. 'AutoKern': True,
  120. 'Kerning': 0,
  121. 'Tracking': 0,
  122. 'Leading': 0,
  123. 'Font': u'Arial',
  124. 'PointSize': myfont,
  125. 'Italic': False,
  126. 'Bold': False,
  127. 'Underline': False,
  128. 'Strikethru': False,
  129. 'AntialiasStyle': App.Constants.AntialiasEx.Sharp,
  130. 'WarpText': True,
  131. 'SetText': myjustify,
  132. 'Fill': None,
  133. 'Stroke': None,
  134. 'LineWidth': 0,
  135. 'LineStyle': {
  136. 'Name': u'',
  137. 'FirstCap': (u'',0.25,0.25),
  138. 'LastCap': (u'',0.25,0.25),
  139. 'FirstSegCap': (u'',0.25,0.25),
  140. 'LastSegCap': (u'',0.25,0.25),
  141. 'UseSegmentCaps': False,
  142. 'Segments': []
  143. },
  144. 'Join': App.Constants.JointStyle.Miter,
  145. 'MiterLimit': 10,
  146. 'Characters': mytext,
  147. 'Strings': None,
  148. 'TextTarget': (0,0,[1],False),
  149. 'PathTarget': None,
  150. 'GeneralSettings': {
  151. 'ExecutionMode': App.Constants.ExecutionMode.Default,
  152. 'AutoActionMode': App.Constants.AutoActionMode.Match,
  153. 'Version': ((9,0,1),1)
  154. }
  155. })
  156.  
  157. # SelectNone
  158. App.Do( Environment, 'SelectNone', {
  159. 'GeneralSettings': {
  160. 'ExecutionMode': App.Constants.ExecutionMode.Default,
  161. 'AutoActionMode': App.Constants.AutoActionMode.Match,
  162. 'Version': ((9,0,1),1)
  163. }
  164. })

Any thoughts? Many thanks in advance, Charlie.
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 174
Reputation: Jen0608 can only hope to improve 
Solved Threads: 10
Jen0608 Jen0608 is offline Offline
Posting Whiz

Re: PSP9 Script

 
0
  #2
Mar 23rd, 2009
hope i can help you with it but im not really good in programming. Im also a photographer and would love to have a portfolio with the same effects...
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Graphics and Multimedia Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC