Sorry, I posted this in the General Discussions area, and it look like I should have posted it here, si this is a duplicate posting:
I am trying to write an application for a customer. We purchased Version 7.2.050 for them. I have 7.2.040 on my machine. My script runs OK on my machine but not on theirs. I went back and tried the example script in the help menu:
GetFileList>c:\temp\*.*,files
Separate>files,;,file_names
MessageModal>Num Files: %file_names_count%
Let>k=0
Repeat>k
Let>k=k+1
Message>file_names_%k%
Until>k,file_names_count
This works fine on my machine,
but with 7.2.050 the first Message box says:
"Num Files %file_names_count%"
and then an error box pops up that says:
"Error - Label K not found!"
Is this a bug in the current version?
Scripts work in 7.2.040 but not in 7.2.050
Moderators: Dorian (MJT support), JRL
Hi,
No this is due to a bug fix where Separate used to return a count of 1 even when no files were returned. So the example actually should read:
GetFileList>c:\temp\*.*,files
Separate>files,;,file_names
MessageModal>Num Files: %file_names_count%
If>file_names_count=0,done
Let>k=0
Repeat>k
Let>k=k+1
Message>file_names_%k%
Until>k,file_names_count
Label>done
i.e. if there are no files in the list, you can't loop through them - you can't loop through non existant files - you can't loop from 1 to 0. So, if file_names_count is zero jump the loop.
No this is due to a bug fix where Separate used to return a count of 1 even when no files were returned. So the example actually should read:
GetFileList>c:\temp\*.*,files
Separate>files,;,file_names
MessageModal>Num Files: %file_names_count%
If>file_names_count=0,done
Let>k=0
Repeat>k
Let>k=k+1
Message>file_names_%k%
Until>k,file_names_count
Label>done
i.e. if there are no files in the list, you can't loop through them - you can't loop through non existant files - you can't loop from 1 to 0. So, if file_names_count is zero jump the loop.
MJT Net Support
[email protected]
[email protected]