Jump to content

using the "or" operator


Recommended Posts

hi gang,

When specifying the msgbox flags in vb, it is recommended to

use the "Or" operator to combine options, as in:

vbInformation Or vbOK

I tried this in au3 and it doesn't work:

Const $vbOK = 0x0

Const $vbInformation = 0x40

MsgBox($vbInformation OR $vbOK, "Title", "Text")

Adding the flags together DOES work (i.e., the "+" operator)

MsgBox($vbInformation + $vbOK, "Title", "Text")

Coming from vb, one would expect the "Or" and the "+" to

produce the same result, but that is obviously not the case.

please explain, jw

Link to comment
Share on other sites

you use

BitOR()
oÝ÷ Ùú+jëhØ^­è¬jw±jjey«­¢+Ø)5Í   ½à¡  ¥Ñ=H ÄذаÈÔؤ°ÅÕ½ÐìÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì¤(

the first "16" gives us a Stop-Sign icon.

the second "4" gives us a Yes-No option.

and the third, "256" sets the default focused button as the "No" button.

in this case it is the same thing as : 16+4+256.

hope this helps.

Edited by CHRIS95219
Link to comment
Share on other sites

This is, in my opinion, AutoIts largest drawback - The use of functions and kaywords instead of operators, like BitOr onstead of |, and Then...EndIf instead of {...}

that makes no sense. How is that a drawback?

Just because it's not similar to many other languages in the use of operators, doesn't mean it's a drawback...VBsript does it that way...

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Link to comment
Share on other sites

Well, i said IMO, and i see it as a drawback cause i prefer it the other way... With operators...

Just because it's not similar to many other languages in the use of operators, doesn't mean it's a drawback...VBsript does it that way...

<Hates everything with VB in it :) > Edited by Persen
Link to comment
Share on other sites

Well, i said IMO, and i see it as a drawback cause i prefer it the other way... With operators...

<Hates everything with VB in it :) >

yeah, its a whole lot easier to understand just plain english. Who wants to learn what "&&", "||", and "|" mean rather than just "And", "Or", and "BitOr".

But I guess it's all just personal preferance.

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...