mr_unreliable Posted September 22, 2006 Share Posted September 22, 2006 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 More sharing options...
cppman Posted September 22, 2006 Share Posted September 22, 2006 (edited) 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 September 22, 2006 by CHRIS95219 Miva OS Project Link to comment Share on other sites More sharing options...
MHz Posted September 22, 2006 Share Posted September 22, 2006 Is that Or or xOr? I'm not aware of using Or for flags. Link to comment Share on other sites More sharing options...
mr_unreliable Posted September 22, 2006 Author Share Posted September 22, 2006 you use BitOR() for autoit. Yes, thanks, that did it, jw Link to comment Share on other sites More sharing options...
Persen Posted September 22, 2006 Share Posted September 22, 2006 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 {...} Link to comment Share on other sites More sharing options...
cppman Posted September 22, 2006 Share Posted September 22, 2006 (edited) All though using { ... }, |, ||, &&, is nice, there really isnt any difference, so there isn't any drawback. Edited September 22, 2006 by CHRIS95219 Miva OS Project Link to comment Share on other sites More sharing options...
theguy0000 Posted September 22, 2006 Share Posted September 22, 2006 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 More sharing options...
Persen Posted September 25, 2006 Share Posted September 25, 2006 (edited) 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 September 25, 2006 by Persen Link to comment Share on other sites More sharing options...
theguy0000 Posted September 26, 2006 Share Posted September 26, 2006 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now