re open and read commands

Mike Fedkiw filepro at adelphia.net
Sat Dec 1 20:05:46 PST 2007


the following line gives me a syntax error

import ascii ifile = c:\imagelist.wri r=\n






----- Original Message ----- 
From: <fp at casabellagallery.com>
To: "Mike Fedkiw" <filepro at adelphia.net>
Cc: <filepro-list at lists.celestial.com>
Sent: Saturday, December 01, 2007 10:43 PM
Subject: RE: re open and read commands


> Mike posted:
>
>> I figured I would have to loop the processing but how do I tell it to go 
>> to
>> the next line. I just need to be able to bring each line into a variable 
>> one at a time.
>>
>> the show command  just keeps showing the first line.
>>
>>
>>
>> this is what the .txt file looks like
>> aab_fb1020.jpg
>> aab_fb612.jpg
>> aab_fb615.jpg
>> aab_fb815.jpg
>> aab_fb820.jpg
>> AFR_ebsab.jpg
>> AFR_ebsag.jpg
>> AFR_ebsar.jpg
>>
>> this is what processing table looks like
>>
>>
>>   1  -------   -   -   -   -   -   -   -   -   -
>> start   If:
>>        Then: xx(1,*,g)
>>   2  -------   -   -   -   -   -   -   -   -   -
>>         If:
>>        Then: declare local handle(8,.0)
>>   3  -------   -   -   -   -   -   -   -   -   -
>>         If:
>>        Then: declare local txt
>>   4  -------   -   -   -   -   -   -   -   -   -
>> @wlfxx  If:
>>        Then: aa="c:/jpglist.wri"
>>   5  -------   -   -   -   -   -   -   -   -   -
>>         If:
>>        Then: handle=open(aa,"rt")
>>   6  -------   -   -   -   -   -   -   -   -   -
>>         If: handle le "0"
>>        Then: errorbox"unable to open file:"<aa;exit
>>   7  -------   -   -   -   -   -   -
>>         If:
>>        Then: i="40"
>>   8  -------   -   -   -   -   -   -
>>   read    If:
>>        Then: x=readline(handle,txt,i)
>>   9  -------   -   -   -   -   -   -
>>         If:
>>        Then: show"@"<txt
>>   10  -------   -   -   -   -   -   -
>>         If: x eq "0"
>>        Then: x=close(handle)
>>   11  -------   -   -   -   -   -   -
>>         If:
>>        Then: goto read<hr>_______________________________________________
>
> Have you given some thought to what I suggested?  Give these lines of code
> a shot and see what happens ...
>
> 
>   -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
> loop   ? If: 
> ?
>       Then: import ascii ifile = c:/jpglist.wri r=\n 
> ?
> 
>   -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
>       ? If: not ifile 
> ?
>       Then: show "@Done!"; exit 
> ?
> 
>   -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
>       ? If: 
> ?
>       Then: show "@"&ifile(1) 
> ?
> 
>   -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
>       ? If: 
> ?
>       Then: goto LOOP 
> ?
> 
>   -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
>
> Of course, make sure to place them where needed ...
>
> Regards,
>
>
> ---
> Jose Lerebours
> 954  559  7186
> http://www.fpgroups.com
>
> 




More information about the Filepro-list mailing list