Hello everybody! I'm new to PS.
Please, help.
While running PS file (it actually will be printed) I need to load some text in separate variables from another file (on hard drive).
I actually can read only first line from that file, operator "setfileposition" is not working correctly.
My code is:
___________________________________________
%!
/temp () def
/temp2 () def
/datafile {(c:\\xgfc\\projects\\cb\\number.txt) (r) file} def
datafile
23 string readstring
pop
/temp exch def
(var1 print temp =
datafile 25 setfileposition
datafile 23 string readstring
pop
/temp2 exch def
(var2 print temp =
datafile closefile
___________________________________________
the result is:
var1:0111111111111111111111
var2:0111111111111111111111
the same first line from number.txt file...
Can anyone help me?
Please, help.
While running PS file (it actually will be printed) I need to load some text in separate variables from another file (on hard drive).
I actually can read only first line from that file, operator "setfileposition" is not working correctly.
My code is:
___________________________________________
%!
/temp () def
/temp2 () def
/datafile {(c:\\xgfc\\projects\\cb\\number.txt) (r) file} def
datafile
23 string readstring
pop
/temp exch def
(var1 print temp =
datafile 25 setfileposition
datafile 23 string readstring
pop
/temp2 exch def
(var2 print temp =
datafile closefile
___________________________________________
the result is:
var1:0111111111111111111111
var2:0111111111111111111111
the same first line from number.txt file...
Can anyone help me?