My background is Illustrator, not scripting, and I have used other scripts and find them fantastic but i really wanted to have a go myself,

this script is my "baby steps" script.

I know once i get my head round all the syntax that scripting will make my life so much easier but its very tempting to give in when you try to do something so simple and you just simply dont know the correct syntax.

Only the people who demand a script or solution ( like it's there right ) are frowned upon… Those wanting help almost never… You will find in all the scripting forums here people are willing to help those who want to learn… ( the teach a man to fish approach ). Im muppet cos thats what I was when I was a noob asking here… still am…

The numbers in the square brackets indicate an item of an array ( list ) the rectangular bounds of an artboard are a 4 item Array [ '0', '0', '200', '100' ] javascript is zero based so first item is [0] and so on…

I am in the middle of reading the relevant documentation honest!!, but it is a slow process ( or maybe I am a slow process!!).

It is almost like giving a man a Spanish dictionary and expecting him to be able to write a piece of classic literature in perfect Spanish.

So in the eternal hope of a quick fix could you guide me in the intricacies of how to display a filename with out all the "%20" gubbings? ( "gubbings" = A yorkshire word that roughly translates into "stuff i don't understand"

This is not essential but i just dont like the way it looks.

I am currently fumbling blindly with .name and .fullName

I have seen some scripts on here that run a filter through the string looking for the odd characters and replacing them with spaces i wanted to ask the question, "am I missing the obvious?"

Can i return the filename without the URL formatting?

// CODE BEGIN

var docRef = app.activeDocument

var pointTextRef = docRef.textFrames.add();

pointTextRef.contents = docRef.name + ' ' + docRef.fullName;

pointTextRef.top = 635;

pointTextRef.left = 20;

// CODE END

.name returns my document name with normal spacing, but .fullName returns the document name and file location in a URL format. Is this purely the nature of the beast? or is it because the file is stored on a network drive?

.fullName is the entire file path to the file. It will return the same form with a few less parts if it is located on your local hard drive. Try making a file and saving it to your desktop and then run your script. If you only want the name of the file and not the path to the file then just use .name.