Hi Geoff,The problem with stringing conditions together in an if statement is always that the compiler/translator might choose to evaluate them in another order from the one you think is obvious. In any language, not just in JAWS scripting, it's far safer to employ parentheses liberally, to leave no possibility of confusion.
hth Martin----- Original Message ----- From: "Geoff Chapman" <gch@xxxxxxxxxxxxxxxx>
To: <jawsscripts@xxxxxxxxxxxxx> Sent: Sunday, October 14, 2007 4:09 PMSubject: [jawsscripts] Re: help with multiple If statement entries not working?
but james, do you not feel that three conditions like this, ought to be ableto be successfully strung together with only the one, "then," at the end? believe thatjam,james, jJame,s---- Original Message ----- From: "James Panes" <jimpanes@xxxxxxxxx>To: <jawsscripts@xxxxxxxxxxxxx> Sent: Thursday, October 11, 2007 9:55 PM Subject: [jawsscripts] Re: help with multiple If statement entries not working?Hi Guys, You are missing the "Then" keyword at the end of your conditions. Regards, Jim jimpanes@xxxxxxxxx jimpanes@xxxxxxxxxxxx "Everything is easy when you know how."----- Original Message ----- From: "Daniel Dalton" <daniel.dalton47@xxxxxxxxx>To: <jawsscripts@xxxxxxxxxxxxx> Sent: Thursday, October 11, 2007 7:33 AM Subject: [jawsscripts] Re: help with multiple If statement entries not working? If you can send me all your scripts I might be able to help further. I don't have all the functions to test. What happens if you change the first line of the if statement to this? if (GetTextInRect (345, 327, 501, 350) != "TakeAway Unit" || GetTextInFrame ("ConfirmTakeAwayCustomerDetailsTriggerConfirmTakeawayDetailsScreen") != "Unit" && GetTextInRect (273, 327, 417, 350) != "Confirm Take") then Are you saying if condition one or 2 are true and condition 3 is true execute code? It will still execute if condition 1 and 2 are both true as well.It won't execute however if condition 1 is false and condition 2 is false.Or if condition 3 is false it won't execute. Hope that isn't too confusing. Let me know if you want further help and I will see what I can do. -- Daniel Dalton http://members.iinet.net.au/~ddalton/ daniel.dalton47@xxxxxxxxx __________ View the list's information and change your settings at http://www.freelists.org/list/jawsscripts __________ View the list's information and change your settings at http://www.freelists.org/list/jawsscripts__________ View the list's information and change your settings at http://www.freelists.org/list/jawsscripts
__________View the list's information and change your settings at http://www.freelists.org/list/jawsscripts