Separating Scanned Data
Re: Separating Scanned Data
Fantastic that works perfect. Now if someone has to manually type in an artwork ID they still can. Thank you both for all the help today.
- JoeWinograd
- Posts: 2203
- Joined: 10 Feb 2014, 20:00
- Location: U.S. Central Time Zone
Re: Separating Scanned Data
The code you posted will not work. For starters, DataArray is an array, so if (DataArray = "XYZ") is bad syntax...it would have to be if (DataArray[N] = "XYZ"), where N is an integer, i.e., the Nth element of the array.bivanchan wrote:we might have some old barcodes floating around
But let's think this through. The old barcodes do not have XYZ anywhere in them, while the new barcodes do. There are many ways to code for this. One simple idea is that when doing the StrSplit(gtx,"XYZ"), the old barcodes will have DataArray[2] as null, while the new barcodes will have DataArray[2] as non-null. The code for that approach is:
Code: Select all
Gui,Submit,Nohide
DataArray:=StrSplit(gtx,"XYZ")
If (DataArray[2]!="")
gtx:=DataArray[2]
Code: Select all
Gui,Submit,Nohide
If (InStr(gtx,"XYZ"))
{
DataArray:=StrSplit(gtx,"XYZ")
gtx:=DataArray[2]
}
- JoeWinograd
- Posts: 2203
- Joined: 10 Feb 2014, 20:00
- Location: U.S. Central Time Zone
Re: Separating Scanned Data
You're welcome...our messages crossed again.