Thursday, January 16, 2014

How To: Simple & Easy Scripting

This tutorial was written on 01/16/2014 and assumes you have working knowledge of PSP. Any simularities to other tuts is purely coincidental and not done on purpose.

Ok this tutorial will teach you a simple and easy way to script tags. For those who don't know what name scripting is, it's a small file you run in PSP that can add text with chosen text effects to your tag automatically. There's different types of script files out there and different methods. Most name scripting methods involve using 2 or 3 script files and can be quite complicated. My method here only uses 1 script file. Now please keep in mind, unlike the more complicated scripts, this will not add names automatically while you walk away from your computer, but it will make things easier if you have to add names to a large number of tags at a time.

For this tutorial you will need:

PaintShopPro (any version works)
Animation Shop (if making an animated tag)
This text file, download and put on your desktop for now

Now the first thing you need to do is to make sure your PSP is pointed at your scripting folders. In PSP click on File, Preferences, File Locations. You'll see something like this:


Scroll down on the left and click on Scripts - Trusted like it shows highlighted above. Now wherever you have psp installed it'll show it pointed there. But you also need it pointed to your psp files folder in My Documents. If it's not already there, click on Add, browse to the location and click on OK. Then where it says Save to: make sure it's pointed to the folder in My Documents like mine shows above. You can click the little drop down arrow and click on that directory if it's not already there. Click Ok to close the window when you're done.

Next step is to enable your script toolbar. Go to View, Toolbars and click on Script. It'll pop up on your screen, you can move it if you don't like the location. Depending on your psp version it'll look something like this:


Now when you make a tag, do all the steps except adding a name. Resize if desired, add your copyrights, get it all done minus the name. I have a folder in My Documents titled Samples. I save all of my blanks there. And I save my tags with layers fully intact so if I make a goof it's so much easier to go back and fix one layer then try to recreate the entire tag.

For non-animated tags, I add a layer at the very top of the layer palette and label it Name. You'll see why later. Then I make sure I save my blank with that new layer on there. It'll look something like this on yours (depending on your version, your tag and your layers, etc):


I do something a little different for animated tags and will explain that later.

Now with that done, I'll make a duplicate of my tag and close the original so no risk of actually changing or deleting anything I don't mean to. Then I go like I'm going to add a name, pick out a font, colors, effects etc. If you're making tags for a list of names, practice adding the longest name on your list to your tag to see how it looks, if it'll fit properly with the font and font size you chose. Be sure to do one that has lower case that falls below the line like the letters g, q, etc.

When you get everything like how you like then delete the name from that tag and make sure your text tool is selected. Go up to your script toolbar and click on the the red circle, that's the record button. Click on your tag where you want the name to start and type out a name, I usually use my own. With the script still running add all of your effects of choice, bevel, noise, glow, drop shadow, etc. When you're done adding your name then click on the file icon on your script toolbar to save it. Make sure it's pointed at the trusted script folder in My Documents. I give the script file the same name as the tag. So if my tag is titled BJred then the script file is titled BJred. Makes it super easy to figure out with script goes with which tag. If you make a goof while recording your script, you can click the red X to cancel the recording, undo what you've done, start the recording again and try adding your name again.

Now your tag should of only had the name added, nothing else. Now that the script is no longer running you can move the name if you need to and then merge it as desired and save.

Now to fix the script so it'll add names to tags for you. On the script toolbar you'll see a drop down arrow. Click on that and scroll through till you find your script file you just created. Click on it to activate it. Then to the right of that down arrow is an arrow pointing to the right and then next to that is an icon that looks like a scroll and quill:


Now depending on your verson, you may or may not see this script editor window:


If you do, then click on the Text Editor button and it'll open the script file in Notepad. Some will automatically open in Notepad. You'll see something like this:


Now as you see in the example above, and on yours, you'll see def  ScriptProperties and then stuff below it, def  Do(Environment) and stuff below that and then finally # Text and stuff below that. Right above where it has # Text is a bracket and parenthesis like this }). Click right behind that and hit enter one time. Now remember that text file you downloaded, open that up, copy the entire thing (it's only 2 lines of text) and paste it right into the new line you created. It'll look like this:


Now you're going to scroll down below the # Text options. You'll see it list the font you used, font size, foreground/background colors, etc. You need to scroll till you see the Characters entry. It'll look like this. The name you put on your tag will show, like how mine has my name.


You'll need to delete the u'Melissa' part (with your name showing of course, this is an example) and type in TagName exactly like that with no spaces so it'll look like this:


Now you can save and close this text file.

Now let's test it. Open up the blank of the tag you just made a script for, make a duplicate of it so you're not working on the original. Remember the layer I had to label Name? Rename that layer with a name you want to put on the tag. You can use your own again to test it. Then on your Script Toolbar click the blue right pointing arrow between the edit button and the drop down arrow. This is the run script button. And watch as it adds your name and text effects to the tag in lickity split. Now provided you edited the script file exactly as I told you without any other changes, you should have no errors at all. So now whatever name you rename that name layer in your layer palette, that is the name it'll put on the tag. So then all you have to do is rearrange if needed (sometimes you just have to move it a bit), merge your tag and save.

Now some of the effects you used will run silently, like usually inner bevel and drop shadow. Some don't, they'll pop up the window and you'll have to click the ok button and the script will continue. Eye Candy Gradient Glow is one of these and it's a filter that I use on almost all of my tag names. To fix that so it runs silently also open up the text editor for the script, scroll down till you find the entry for the filter you used, like this:


See where it says Interactive, change that to Silent like this:


You can do this with any effect that doesn't run silently. And the reverse is true, if it's running silently but it doesn't do the effect just right you can go back in and change it back to Interactive. Some filters like Eye Candy 6 I think it is is one of those where I have to leave it at Interactive cause it's stupid.

So now let's say you need to add 10 names to the same tag. You'll make 10 duplicates of the original, closing the original when done. Then on those 10 you'll change the name layer of each one to the names of all 10 people. Then one at a time, run the script adding the names. Then you can merge and save all of them. When I do a large number, after I open up all those duplicates I go to Window, Tabbed Documents and it changes them to full size windows but tabbed along the top. It's easy to just press Ctrl Tab to move between each tab. When I'm done adding all the names and merging them then I click on Tabbed Documents again and it untabs all of them.Then as I save each one, I'll minimize it so I know it's done.

That's the gist of it, pretty easy huh? Oh but what about animated tags you ask? Well that's easy too.

I'll make the blank as usual, all layers intact. Then I copy layers over to Animation Shop just like I normally would, only thing different is there's no name on the tag. Once I have everything copied over and I have it exactly is it would need to be if I were to click and save it, I then click on the first frame, select all and copy. Back to PSP and Paste As A New Image. Then I save that with the same name as the original tag but with a slight change. So if the original tag is BJred then the new one is BJredANI. I save both of those as psd files since both programs recognize them. If I had to change the speed of the animated tag then I include that in the file name as well, so it'd look like, BJredANI-25.psd. That way I'll remember to change the speed if I need to go back in to make more. Do not save the animated blank as a gif file. I used to do this and when you add names and save it again, it can mess up your animation and increase the risk of graininess.

So when I want to add names to a previously made animation blank, I open that psd file in AS and select all, change the speed if needed and then add the name.

But before you add the name make sure you turn your Propagate Paste on. You'd be surprised how many taggers do not know about this little gem. What does it do? Well let's say your animated tag has 8 frames, normally you'd have to make the name in PSP using my method or similar above, paste it as a new animation in AS, then keep pasting after current layer till you have 8 frames of your name. Click on the first frame, select all and drag and drop onto the first frame of your tag thereby transfering all 8 frames of your name onto the 8 frames of your tag. Well Propagate Paste saves you all that work. You just need 1 frame of your name. Make sure your tag is fully selected with the 1st frame being highlighted in blue. Click on your name and drag it onto that first frame and poof, Propagate Paste will automatically place your name on all the other frames in exactly the same spot. Awesome huh? If you don't know how to turn it on there's 2 ways. You can go up to Edit and click on Propagate Paste or on the toolbar you'll see this icon, just click on it to turn it on and off:


Easy as that. Now to teach you now to make the names when you make an animated tag. Well first you'll need to test on a duplicate of your tag in psp to see how the names will look with your chosen font, font size, colors etc. Once you're done figuring all that open up a new canvas a little larger then your longest name. I usually do 350 x 150. Then add a new raster layer, recording your script adding the name to that blank canvas, saving it again as the same name as your tag blank. Then you'll go in and edit it exactly the same way you did above and when you want to create names, you'll just change the name of the layer on the blank canvas to a name and run the script. When that's done, copy it over to AS and do as instructed above. When done undo your animated tag to just before you added your name. Go back to psp and delete the name on the blank canvas, change the name layer to the next person and repeat. It's as easy as that.

So as I said in the beginning, it's a tad more work then the complicated scripts that do everything for you but this is an easy and simple to understand way to script tags.

I hope you enjoyed my tutorial here and if you have any questions, you can click on the Contact Me tab at the top of this page and shoot me an email.