Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto populating text fields. Text insert question. 2

Status
Not open for further replies.

stevef22

Technical User
Sep 20, 2005
83
US
Hello and good day to everyone, glad to be a part of this forum! I am going to stick around this site, GREAT INFORMATION!

My question is how do I insert text faster? I am bulding a plaque. Booooring yes I know but necessary. Anyone know how to set up "pre-determined" text fields that populate from an internal or external text? Right now I have to >duplicate layer>drag layer to new spot>enter in new text. It would be really neat if PS could populate from a file like web-site populate pages from other text files. If anyone knows a faster way to enter in this text then your are the PS GURU. Thanks again.
Steve
attachment.php
 
You should try it.
Then you can decide for yourself.
Go get a copy of knoppix from and burn a copy to CD. You need to get nero (or whatever you use) to open the file as a CD image and then burn the image.
Once you have the CD, stick it in the drive and reboot the PC ensuring that the bios is set to boot from CD.
Hey Presto, a running linux system.
And the beauty is that you don't have to install anything. As soon as you want your beloved Windoze back you simply logout and it will reboot and spit the CD back out to you. When it reboots without the CD, you get your windoze back.
How cool is that? Complete power OS running from CD with no need for hard disk at all.
Try it, see how you get on.
If you have any troubles, come back and drop questions in to the linux forum.


Trojan.
 
BTW: To run your perl code try this:
Code:
cd "Documents and Settings\lrn2k9\Desktop"
perl JanuaryPlaque.pl


Trojan.
 
I was just about to post the same - 100 replies - ouch! I guess it was a fairly complex problem though...

firstly type this:-
cd Documents and Settings\lrn2k9\Desktop\

if that is successful:-
perl JanuaryPlaque.pl


Kind Regards
Duncan
 
sorry - did not see your post Trojan

have been discussing the other way of dir /x to see short names in the DOS shell... nightmare!


Kind Regards
Duncan
 
Duncan, works like a charm, Perl creates a .PS right on my desktop! Great Job! I think this solution is very creative! Im going to try the psyudo linux on my other PC. Maybe I will be hooked.

Steve
 
This would be an impressive thread if it had lots of people in it.
I think it's really cool that there were so few of us actually posting here!
Duncs, have you tried linux / knoppix ?



Trojan.
 
S U P E R B !!!

A star for Steve - after all he's taken quite a bit on here! And i think he's been quite brave taking on board Linux, Perl & Postscript in one go!!!

What do you reckon Trojan?

I am so glad you have the script running - and can see the output appear on your desktop (and i assume it loads into Photoshop fine)

You can now edit the Perl script - small tweaks initially - to fit the text on top of your template - if you so wish. If not, you have learned alot already

Well done dude


Kind Regards
Duncan
 
Hi Trojan - no i have not tried knoppix. I have had a brief spell of Red Hat on a PC a few years back. But since the launch of OS X i have used nothing else. Sorry! It is based on BSD UNIX - as i am sure you are probably aware. Due to my love of Perl - I spend most of my life in the terminal. Sad. But true.


Kind Regards
Duncan
 
I've given you a star Duncs for being too clever for your own good!
;-)
Steve, knoppix is not pseudo linux, it's real linux, just running from CD instead of hd.
I think you'll find it has perl pre-installed and many utilities that you probably wont even expect.
I think it has the Gimp pre-installed so you should be able to check that out too and compare with Photoshop.
All in all, it's a complete OS and a complete experience.
You say that you're amazed the Duncs and I (and others I guess) don't use windoze in our day to day work, I'm amazed that so many people do.
I think the problem is that the vast majority of people do not even know that knoppix and linux even exists and so don't even know that there is a decision there to be made.
I therefore challenge you to try it out and see what you think. If you only ever run it once and hate it, at least you can say you tried. At least you can say that you made the choice. I just wish the rest of the computer literate population of this world had the same opportunity.

I wish you luck and hope to see you again in these forums.



Trojan.
 
Thank you dude! Too clever for my own good? I'm about as sharp as a marble! But thank you anyway And thanks for helping our mutual friend on his path to programming. I am sure you are as please as i am about that :)

And backing up Trojan's last statement... please do take his advice - it won't cost you anything & you won't even need to uninstall anything if you don't like it. But heck - if you are getting serious - then please give it a go! I could never move away from a UNIX/Linux environment now!

You could get yourself a lovely Macintosh... and have the best of both worlds ;-)

But seriously, please give it a go! - and good luck


Kind Regards
Duncan
 
Well said Duncs.
Not many people realise that the latest breed of Macs are indeed BSD Unix machines. As you say, you can, in some ways, have the best of both worlds.


Trojan.
 
Anyone know where else to upload images, my serv crashed. I would like to ask another questions w/ image.

Steve
 
on tec support for myserv now, will keep posted. : )
 
The results from the script give me mixed results. Can you please help me make it produce image one?
four.gif



------------------------------------------------

Here are the current results, January Does't show up.
Perl doesn't read third line from ____DATA____
five.gif
 
At the risk of treading on Duncs toes:
Code:
#!/usr/bin/perl

$v = 20;

open (PS_OUT, "> plaque_names.ps");

select PS_OUT;

chomp (@data = <DATA>);
#my $fontname = "Helvetica";
my $fontname  = "Times";
my $largesize = 14;
my $smallsize = 10;

print <<PREAMBLE;
%!PS

%---------- Procedures ----------

/cm {28.3464567 mul} def

%---------- Postscript ----------


PREAMBLE

for ($x=0; $x<=$#data; $x++) {
  if ($x % 3 == 0) {
    for ($y=1; $y<=4; $y++) {

       $name = shift @data;
      $store = shift @data;
       $date = shift @data;

      ($firstname, $surname) = split(/ /, $name);

      print $y * 4 . " cm " . $v . " cm moveto\n";
      print "/$fontname-Bold findfont $largesize scalefont setfont\n";
#      print "($firstname) dup stringwidth pop 2 div neg 0 rmoveto show\n";
      print "($name) dup stringwidth pop 2 div neg 0 rmoveto show\n";

      print $y * 4 . " cm " . ($v - 0.75) . " cm moveto\n";
#      print "/$fontname-Bold findfont $largesize scalefont setfont\n";
      print "/$fontname-Bold findfont $smallsize scalefont setfont\n";
#      print "($surname) dup stringwidth pop 2 div neg 0 rmoveto show\n";
      print "($store) dup stringwidth pop 2 div neg 0 rmoveto show\n";

#      print $y * 4 - 1.5 . " cm " . ($v - 1.25) . " cm moveto\n";
      print $y * 4 . " cm " . ($v - 1.25) . " cm moveto\n";
      print "/$fontname findfont $smallsize scalefont setfont\n";
#      print "($store) show\n";
      print "($date) dup stringwidth pop 2 div neg 0 rmoveto show\n";

    }
    print "\n";
    $v-=4;
  }
}
print "showpage\n";

close PS_OUT;

__DATA__
Leann Mckneand
Store 592
January 2005
Angela Schuessler
Store 0593
January 2005
Rufus Smith
Store 2220
January 2005
Sara Doss
Store 2310
January 2005
Laynette Mccray
Store 2319
January 2005
Atalissa Vaughn
Store 2394
January 2005
Alex Camarrillo
Store 0903
January 2005
Roseann Lyson
Store 1409
January 2005
Jon Weller
Store 2352
January 2005
Jon Doh
Store 5555
January 2005
Jon Doh
Store 5555
January 2005
Jon Doh
Store 5555
January 2005
Jon Doh
Store 5555
January 2005
Jon Doh
Store 5555
January 2005
Jon Doh
Store 5555
January 2005
Jon Doh
Store 5555
January 2005
Jon Doh
Store 5555
January 2005
Jon Doh
Store 5555
January 2005
Jon Doh
Store 5555
January 2005
Jon Doh
Store 5555
January 2005
Jon Doh
Store 5555
January 2005
Jon Doh
Store 5555
January 2005
Jon Doh
Store 5555
January 2005
Jon Doh
Store 5555
January 2005
Jon Doh
Store 5555
January 2005
Jon Doh
Store 5555
January 2005
Jon Doh
Store 5555
January 2005
Maybe that's a start.
Let me know what needs modifying.



Trojan.
 
The results from the script give me mixed results." lol
Sorry guys im really tired.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top