[jawsscripts] help with multiple If statement entries not working?

  • From: "Geoff Chapman" <gch@xxxxxxxxxxxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Thu, 11 Oct 2007 20:27:08 +1000

Guys. Sorry to be boring, I'm not that long into scripting, and even the most basic thing seems to be eluding me tonight! and I really would like this to work. if any kind soul could help me debug this simple if statement?

The Code follows: what I want to say is:
if this condition is so,
or, if this and this condition are so,
then do x. but it isn't working the way I'm writing it, so somethin is wrong. when I just have the first or, branch of it though, which is the screen I'm currently working with, it functions fine, so it's something to do with the multiple statements that I'm messing up, I've tried putting parens around only the two, and, statements, and around the whole thing from beginning of the first one straight after the if, and at the end, right before the then, which is the way it's written below here now, but neither one seems to function, not that I fvelt it should need parens around it anywhere really anyway!.
here comes  the code:
if (GetTextInRect (345, 327, 501, 350) != "TakeAway Unit"


|| GetTextInFrame ("ConfirmTakeAwayCustomerDetailsTriggerConfirmTakeawayDetailsScreen") != "Unit"



&& GetTextInRect (273, 327, 417, 350) != "Confirm Take") then



LoadFrameSetFr ("CustomerDetails")



EndIf



in the above, the first if statement although definitely true, is not working as if the function thinks it's true, i.e. the text is present, and it's been told only if absent to follow through,

yet the LoadFrameSet function is still happily firing!

any help greatly appreciated.

Thank you.



geoff c.



Geoff c.





__________ 
View the list's information and change your settings at http://www.freelists.org/list/jawsscripts

Other related posts: