String comparison methods
Hi,
I have a window for which I need to verify that the caption .the value is "Report: C:\Program Files (x86)\Report2Web Client Tools\BursterWatch\PQ5.mfd Profile: PQ5.mfdProfile - Report2Web Burster" .
The variable "b" returns substring as 'C:\Program Files (x86)\ReportWeb2Client Tools\BursterWatch\PQ5.mfd'.I tried to use aqstring.Find,aqstring.Compare but soemhow it is not able to compare correctly as it should return true.Instead it returns false.In the below code I simply used the comparison operator but still it returns with an error .Why are these methods not working for this string . Please tell me the correct way to do it.Most of my scripts have compare string operation and all have the same problem.For some it works,for some it doesn't.
The code looks like this:
BurstWnd = Sys.Process("Burster").VBObject("frmPDFView").WndCaption;
b = aqString.SubString(BurstWnd,8,68);
if (b == 'C:\\Program Files (x86)\\ReportWeb2Client Tools\\BursterWatch\\PQ5.mfd')
Log.Message(true);
else
Log.Error(b);
Thanks.