Earlier in the script the macro moves to a field in a program that should contain either the letter r or s copies it to the clipboard, stores it as a variable (side1R, side1S, side2R, side2S respectively) and then assigns the value of 1 if the letter is there or 0 if it isn't.
Code: Select all
SRT>2PartCheck
If>side1R=r
Let>side1Rcheck=1
Else
Let>side1Rcheck=0
EndIF
If>side1=s
Let>side1Scheck=1
Else
Let>side1Scheck=0
EndIF
If>side2R=r
Let>side2Rcheck=1
Else
Let>side2Rcheck=0
EndIF
If>side2S=s
Let>side2Scheck=1
Else
Let>sideScheck=0
EndIf
End>2PartCheck
Code: Select all
Srt>2PartReport
//SIDE 1
If>side1Rcheck+side1Scheck=2
Let>Side1Report=Side 1 is correct and can be submitted to the Newsagent portal.
Else
If>side1Rcheck+side1Scheck=0
Let>Side1Report=Side 1 is missing both the S & R markers. This needs to be fixed before it can be submitted.
Else
If>side1Scheck=0
Let>Side1Report=Side 1 is missing the S marker. This needs to be fixed before it can be submitted.
Else
Let>Side1Report=Side 1 is missing the R market. This needs to be fixed before it can be submitted.
Endif
endif
endif
//SIDE 2
If>side2Rcheck+side2Scheck=2
Let>Side2Report=Side 2 is correct and can be submitted to the Newsagent portal.
Else
If>side2Rcheck+side2Scheck=0
Let>Side2Report=Side 2 is missing both the S & R markers. This needs to be fixed before it can be submitted.
Else
If>side2Scheck=0
Let>Side2Report=Side 2 is missing the S marker. This needs to be fixed before it can be submitted.
Else
Let>Side2Report=Side 2 is missing the R market. This needs to be fixed before it can be submitted.
Endif
endif
endif
Message>%Side1Report%, %Side2Report%
end>2PartReport
So as a test I ran two files through it. Side 1 was missing both R & S and Side 2 had both R&S in place. The message that came up was:
So in both cases it seems to think the total is 1 instead of 2 0 as it should be.Side 1 is missing the S marker. This needs to be fixed before it can be submitted., Side 2 is missing the R market. This needs to be fixed before it can be submitted.
Obviously I'm doing something wrong but I've no idea where the error is.