Would anyone please review this code and attached images and show me why I'm getting these errors.
[b]This Code is working correctly[/b]
[code]
SRT>GetContractNum
Let>k=0
GetDialogProperty>BolDialog,ShipperName,Text,ShpName
GetDialogProperty>BolDialog,CarrierCode,Text,SLCode
Label>Start
Let>k=k+1
ReadLn>C:\CP_Macros\Asia\aContract.txt,k,strLine
If>strLine=##EOF##,end
Separate>strLine,comma,aContract
If>{(%ShpName% = %aContract_1%) AND (%SLCode% = %aContract_2%)}
SetDialogProperty>BolDialog,SrvContract,Text,%aContract_3%
EndIf
Goto>Start
Label>end
END>GetContractNum
[/code]
[b]Data in test file aContract.txt[/b]
DNE,APLU,GB10/0294
DNE,MAEU,457725
DNE,MOLU,5045311B10
[b]This is the code that get an error at[/b] - If>{(%ShpName% = %eContract_1%) AND (%SLCode% = %eContract_2%)}
[code]
SRT>GetContractNum
Let>k=0
GetDialogProperty>BolDialog,ShipperName,Text,ShpName
GetDialogProperty>BolDialog,CarrierCode,Text,SLCode
Label>Start
Let>k=k+1
ReadLn>C:\CP_Macros\JohnW\Europe\eContract.txt,k,strLine
If>strLine=##EOF##,end
Separate>strLine,comma,eContract
If>{(%ShpName% = %eContract_1%) AND (%SLCode% = %eContract_2%)}
SetDialogProperty>BolDialog,SrvContract,Text,%eContract_3%
EndIf
Goto>Start
Label>end
END>GetContractNum
[/code]
[b]Data in text file eContracts.txt[/b]
BARNES,OOLU,AE095045
DIVE,APLU,EXPIRED
DIVE,HLCU,S9NSE129
DIVE,HJSC,EXPIRED
DIVE,MAEU,EXPIRED
DIVE,OOLU,AE105010
DLF,APLU,EXPIRED
DLF,EGLV,38611
DLF,HJSC,ANE28170
DLF,MAEU,387057
DLF,OOLU,AE095050
DNE,APLU,TA09/0146
DNE,CMDU,09-1242
DNE,EGLV,38612
DNE,HJSC,ANE101555
DNE,HLCU,S9NSE115
DNE,MAEU,457725
DNE,MOLU,5045311B10
DNE,OOLU,AE105030
[IMG]http://i53.tinypic.com/11snnyb.jpg[/IMG]
Sub routine now working
Moderators: JRL, Dorian (MJT support)
-
- Pro Scripter
- Posts: 132
- Joined: Mon Dec 22, 2008 4:56 pm
- Location: St Augustine FL
Sub routine now working
Thank you in advance for all your help
Gil
Gil
-
- Pro Scripter
- Posts: 132
- Joined: Mon Dec 22, 2008 4:56 pm
- Location: St Augustine FL