I am using the position> command to check for a string in another string. My problem is that sometimes the second string is empty and that causes a error window to get displayed, stopping the script.
For example:
// Generates Error
Let>output_var=
Position>find this,output_var,1,start_pos
If output_var is blank, a window pops up that says "Error in Position Command."
// Works fine
Let>output_var=some text
Position>find this,output_var,1,start_pos
If I click OK on the error message box, it will still return 0 in start_pos, but I dont want that error window to be displayed at all.
Position> command generates unwanted error
Moderators: JRL, Dorian (MJT support)
Hi,
You should do this:
Length>output_var,len_output_var
If>len_output_var=0,skip
Position>find this,output_var,1,start_pos
..
Label>skip
i.e. if the length of the value is zero, don't do the Position and substring manipulation.
You should do this:
Length>output_var,len_output_var
If>len_output_var=0,skip
Position>find this,output_var,1,start_pos
..
Label>skip
i.e. if the length of the value is zero, don't do the Position and substring manipulation.
MJT Net Support
[email protected]
[email protected]