Sorry, but I'm in need of some advice/help. I have just jumped into the dialogbox world because until I found this site, I couldn't figure out how to make them work. What I am doing is capturing a file and using some of the strings for info to send on to other scripting as is or for editing. Anyways, I'll try to be brief:
One of the lines in my capture file looks like this:
TN 040 0 05 05 KEY 00 H MARP DES 997693 31 DEC 2003
I am extracting the four numerical sequences after "TN" and may sometime in the future want/need the 6 numbers after "DES", the four numbers are put into separate editboxes, here's how I did that:
fgets 0 s19
len = 5
strdelete S19 Pos Len
strextract TNa S19 "K" nItem
strextract TNb S19 "K" nItem
strextract TNc S19 "K" nItem
strextract TNd S19 "K" nItem
substr tn1 tna 0 3
substr tn2 tnb 4 4
substr tn3 tnc 6 7
substr tn4 tnd 9 10
This displays the four number fields perfectly, in the four boxes this would show: 040 0 05 05
What I have discovered is that in fact the second "captured" box (tn2) also has the (tn3) data which I discovered as soon as I went to send it for further processing. I've tried changing the start/stop substr capture field, but the above example is the only one I found that works. I also tried putting the substr directly beneath each relevant strextract, but this had no effect. I have been able to somewhat use this as it is since if I need to edit the boxes and I clear what is there it sends fine. The rub is that if I need to send unedited, I would need to send only the tn1, tn2 and tn4 data since tn2 mysteriously has the tn3 data.
I have tried to be brief and many thanks to the contributors to this board, because if I couldn't have read back thru nearly 2 years worth of archives I never would have gotten this far. I've obviously made some errors though. I started scripting to save time, but eeehhh... as time marches on the validity of that reason wanes. I guess the triumph over challenge is enough motivation and this is a pleasant forum so... Anyone have a thought/solution to clear this up and if anyone knows of a way to move the cursor from editbox to editbox other than the one "TAB" key or a mouse click I would appreciate it. Thanks.
One of the lines in my capture file looks like this:
TN 040 0 05 05 KEY 00 H MARP DES 997693 31 DEC 2003
I am extracting the four numerical sequences after "TN" and may sometime in the future want/need the 6 numbers after "DES", the four numbers are put into separate editboxes, here's how I did that:
fgets 0 s19
len = 5
strdelete S19 Pos Len
strextract TNa S19 "K" nItem
strextract TNb S19 "K" nItem
strextract TNc S19 "K" nItem
strextract TNd S19 "K" nItem
substr tn1 tna 0 3
substr tn2 tnb 4 4
substr tn3 tnc 6 7
substr tn4 tnd 9 10
This displays the four number fields perfectly, in the four boxes this would show: 040 0 05 05
What I have discovered is that in fact the second "captured" box (tn2) also has the (tn3) data which I discovered as soon as I went to send it for further processing. I've tried changing the start/stop substr capture field, but the above example is the only one I found that works. I also tried putting the substr directly beneath each relevant strextract, but this had no effect. I have been able to somewhat use this as it is since if I need to edit the boxes and I clear what is there it sends fine. The rub is that if I need to send unedited, I would need to send only the tn1, tn2 and tn4 data since tn2 mysteriously has the tn3 data.
I have tried to be brief and many thanks to the contributors to this board, because if I couldn't have read back thru nearly 2 years worth of archives I never would have gotten this far. I've obviously made some errors though. I started scripting to save time, but eeehhh... as time marches on the validity of that reason wanes. I guess the triumph over challenge is enough motivation and this is a pleasant forum so... Anyone have a thought/solution to clear this up and if anyone knows of a way to move the cursor from editbox to editbox other than the one "TAB" key or a mouse click I would appreciate it. Thanks.