What's wrong with my or statement

Get help with using AutoHotkey and its commands and hotkeys
omar
Posts: 418
Joined: 22 Oct 2015, 17:56

What's wrong with my or statement

27 Apr 2016, 10:35

I have tried this:

if(clip5 != " " or clip4 != clip5)
and
if(clip5 != " " or clip4 != %clip5%)

clip4 and clip5 are just strings.

What am I doing wrong?

Thanks.


Omar
User avatar
Almost_there
Posts: 404
Joined: 30 Sep 2014, 10:32

Re: What's wrong with my or statement

27 Apr 2016, 10:37

Check what the variables really contains.
User avatar
boiler
Posts: 5249
Joined: 21 Dec 2014, 02:44

Re: What's wrong with my or statement

27 Apr 2016, 10:41

What's not working about it? If clip5 is not a space or clip4 does not contain the same value of clip5, then the first one evaluates as true. If both clip4 and clip5 are a space, then it is false. Perhaps the logic is incorrect for what you are trying to achieve.
omar
Posts: 418
Joined: 22 Oct 2015, 17:56

Re: What's wrong with my or statement

27 Apr 2016, 11:43

thanks for the replies guys.
i checked the contents of both vars. they both have the same value

i think my logic is wrong.
doh!!
i needed to use and and not or
lol

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], JackMa, Thorx and 280 guests