What's new
Photoshop Gurus Forum

Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

.txt file for text


BobbyDouglas

New Member
Messages
2
Likes
0
I was wondering if anyone knew how to make a .file in photoshop use the text from a .txt file. I thought I saw this before, but I am unsure how to do it.

It is used when you have a button, and you want to constantly change the text on the button, you just change the txt file.

Any ideas?
 
I'm not sure I understand your question, Bob. If I want to change the text I usually just double-click on the Text layer and type something new, or if I want different words for each button I just write something different on each Text layer.
 
Sounds like you're talking about building variable data. I'm not really sure how you'd do this in Photoshop or if it's possible. I know that you can build variable objects in Illustrator since it will allow you to asign XML:ID's to objects and then base them on a DS. I know that other applications like Flash will do this as well. I thought I remember reading something about that functionality in Photoshop, but I haven't really been able to figure it out. I worked on this a bit in Illustrator and the manual was about as much use as a brick when it came to explaining this feature.

Generally I just build multiple text layers for buttons and edit them manually, but if you're building hundreds of buttons, this is prohibitive, which is why they started introducing variables into graphics applications. Sorry if this isn't much help, but if this is what you're talking about, maybe this will clarify the question for someone who is more versed in the scripting aspects of Adobe products than myself.
 
BobbyDouglas said:
I was wondering if anyone knew how to make a .file in photoshop use the text from a .txt file.

I don't understand it. Since you want to use Photoshop for it, why not just type it? [confused]

I mean... how many buttons are you going to change like this, hundreds??

Not only that, but you'll have text that is too wide... how are you going to deal with that?

I would just type the text and move on to the next project; my way of time managment ;)
 
You need an action for this, and batch work.

You will have to make all your text files and save them in a folder, and have the button image on the other hand.

But as far as I know, it is not possible in Photoshop to have the Text tool automatically accept any kind of txt, rtf, or whatever files.

Unless it can be done with scripting, but that is way above my knowledge, and I suppose you'll have to go to the Adobe forums for that...
 
BobbyDouglas said:
A better example:

I have the button http://www.photoshopgurus.info/forum/templates/subSilver/images/lang_english/icon_buddy.gif (imagine it does not say buddy on it).

I also have a .txt file that inside says icon_buddy.gif= 'buddy'

That above (something similar to it) displays the word 'buddy' on the picture.

You have a similar idea of what I want to do. Do you know how to do this?

I'm sorry, Bobby. I just don't understand what it is you are trying to do. It sounds like you're trying to create more work for yourself than is necessary.

Could you maybe give us a few screenshots of what it is you're talking about?
 
Guys Bobby is talking about Photoshop's scripting capabilities. I believe (or rather i 'think') PS uses Python for its scripting functions.

Unfortunately i don't think there are a lot of folks around, or around here, that can help with this subject. I'm not even so sure that this function of PS is widely used -- you have to download and install special additional files for Photoshop to have this ability. The stock version can't do scripting.

I suggest you ask around at the Adobe U2U Photoshop Forum Bobby. The additional files can be downloaded from Adobe's Photoshop download page on their site.

Good luck. And please feel free to enlighten us here should you find your answer elsewhere.

Thanks. :righton:
 
The only thing I know in Photoshop that deals with changing the .txt field is to make your own document presets, as illustrated in this article:

http://www.creativepro.com/story/feature/19113.html

But like I said above, you are actually creating more work for yourself than is necessary. Just create your different text on individual layers.
 
C9Mouse said:
But like I said above, you are actually creating more work for yourself than is necessary. Just create your different text on individual layers.

As I said before, this has to do with the ability to have quickly updatable information. Let's say you have a database of items that you want to have their own buttons. You have say, 1,500 items and half of them are seasonal and change every 3 months. Now, you could build a PSD with 1500+ layers, or you could build one object that is linked to a text document that builds the images on the fly. When you want to change something, you just change it in the text file, and it generates the image on it's own.

I don't really know the way to do this in practice, but I understand the need for it. Something that people are moving to is using binary image building servers. Basically the binary code for the image is stored in a database field and is actually streamed to the browser on command. This gives you lots of functionality but requries some more advanced programming knowledge.
 
The only thing that comes to my mind are Library items, used in Dreamweaver MX.

Library items are fragments of HTML; that is, they are not a complete HTML document. They are a sequence of HTML that you can reuse in many documents on your site. Any information that appears on many pages in a site and may change from time to time is a candidate for library items, including the following:

• Navigation systems
• Contact information
• Telephone/pager/fax numbers
• E-mail addresses
• Street addresses
• Logos
• Copyright notices

I used Library items on my last web site, which had 100+ pages. I used them for the top and side nav menus, copyright info, and for various content blocks that would change from time to time.

Dreamweaver Library Items function on the same principle as Dreamweaver Templates, but they are used for sections of pages as opposed to entire pages. A master Library Item is created and then can be added to any number of pages. When an update is needed, the Library Item itself is updated and then changes are propagated to all instances of the Library Item throughout the site.
 
You're getting closer to the idea c9 but you're still missing the main concept. Also, DW doesn't really solve building something in Photoshop.

This functionality exists in Illustrator exactly as described, it doesn't exist in Photoshop (at least in 7 and below). But, the more I think about it, I do believe it exists in ImageReady. I will try to see if it indeed uses a variable structure. Anyone else used this functionality before? I know Illustrator uses XML to build the object references and then can be refered based on variables from there... haven't had to do this in the last few years and back then, variables weren't a part of the software. ;)
 
I'm not missing the point. And also I know the Dreamweaver idea doesn't involve Photoshop - it was merely an idea, a suggestion.
 
C9 - Didn't say you were missing the point, I said you missed the concept.

Even if he wanted to use DreamWeaver, Libraries do the opposite of what he's talking about. Libraries take one set of information and iterate it across multiple places. What I'm describing, based on my interpretation of the question, is taking once iteration and using multiple setst of information on it. You're describing symbol/instance behavior, I'm describing variable content behavior.

Bobby - I checked the functionality of ImageReady, it does support variables, but it does not support using them from an external source from what I can tell. I'm sure you could achieve what you want using scripting, or another proprietary methodology. The variable structure in IR isn't very robust unfortunately. I don't know that this is true of the CS line of products though, I've heard that hey have a much more solid scripting engine, but I don't know that that is helpful if you don't have access to CS, and I couldn't guarantee that it would solve the problem.
 
Aww crap.. damn macs. Grr.

Neway is this kinda like a CSS but for an image?
 

Back
Top