Jump to content

A Bitand problem


Achilles
 Share

Recommended Posts

Alright I have a line of script that goes as such:

If Bitand($hour = "", $minute = "", $time = "HH:MM PM/AM" ) then
      Msgbox(0, "Error", "Please insert a time in at least one input box")

I set one of those variables to something else and for some reason it still says they are all = to to their assigned string. The message box still come up all the time. Am I using "Bitand" in the wrong way? If you think I should post the script just let me know,

Piano_Man

My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
Link to comment
Share on other sites

  • Moderators

Alright I have a line of script that goes as such:

If Bitand($hour = "", $minute = "", $time = "HH:MM PM/AM" ) then
      Msgbox(0, "Error", "Please insert a time in at least one input box")

I set one of those variables to something else and for some reason it still says they are all = to to their assigned string. The message box still come up all the time. Am I using "Bitand" in the wrong way? If you think I should post the script just let me know,

Piano_Man

I think the real question here is, do you understand what BitAnd is/does?

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

I think the real question here is, do you understand what BitAnd is/does?

Lol, you may be right. But if I remember right you're the one who told me to use BitOr($ES_READONLY, $ES_CENTER) and if you remember that, then you'll remember that up until that point I had absolutely no idea what Bit stuff did. And I still don't... apparently.

If that's the case, then what I really need to know if a Bit function is going to help me at all... So, would it?

Piano_Man

My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
Link to comment
Share on other sites

Lol, you may be right. But if I remember right you're the one who told me to use BitOr($ES_READONLY, $ES_CENTER) and if you remember that, then you'll remember that up until that point I had absolutely no idea what Bit stuff did. And I still don't... apparently.

If that's the case, then what I really need to know if a Bit function is going to help me at all... So, would it?

Piano_Man

Not with the operation you gave in your example. I think better would be:

If $hour = "" And $minute = "" And $time = "HH:MM PM/AM" Then Msgbox(0, "Error", "Please insert a time in at least one input box")oÝ÷ ÙV«¦åy«,   æz{eG´ß¨hºoÝ÷ Ø­¶nÞÂ¥u©l¡·zÛ^­«ºÚ"µÍYÓ[J    ÌÍÚÝH[Ó[J  ÌÍÛZ[]JH[ÔÝ[Ê ÌÍÝ[YJH[ÙÐÞ
    ][ÝÔÝ[   ][ÝË  ][ÝÑ]HÈÒË][ÝÊoÝ÷ Ù8^¶)¶¬x­~éܶ*'²+0éÜ¢fâ)ààz¹î·«³­j+zØZÞn+eG­ç(ËZÛ4ß¡D@8ÒØÓ4Ñ©ÝÓ~H!
LDtÇW(uí7èDÎ4¶oÝ÷ Ø­+NF+-ê',ÊÚ,zÖâ¶Ì!z|¨¹Ú'ßÛd0«wöÆ¥­æÊØ^­ébì"^}«¥¶ö¥¹ë¢±"Ër뢶Ø^éi~)^~î®

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Not with the operation you gave in your example. I think better would be:

If $hour = "" And $minute = "" And $time = "HH:MM PM/AM" Then Msgbox(0, "Error", "Please insert a time in at least one input box")oÝ÷ ÙV«¦åy«,   æz{eG´ß¨hºoÝ÷ Ø­¶nÞÂ¥u©l¡·zÛ^­«ºÚ"µÍYÓ[J    ÌÍÚÝH[Ó[J  ÌÍÛZ[]JH[ÔÝ[Ê ÌÍÝ[YJH[ÙÐÞ
    ][ÝÔÝ[   ][ÝË  ][ÝÑ]HÈÒË][ÝÊoÝ÷ Ù8^¶)¶¬x­~éܶ*'²+0éÜ¢fâ)ààz¹î·«³­j+zØZÞn+eG­ç(ËZÛ4ß¡D@8ÒØÓ4Ñ©ÝÓ~H!
LDtÇW(uí7èDÎ4¶oÝ÷ Ø­+NF+-ê',ÊÚ,zÖâ¶Ì!z|¨¹Ú'ßÛd0«wöÆ¥­æÊØ^­ébì"^}«¥¶ö¥¹ë¢±"Ër뢶Ø^éi~)^~î®

:)

Thanks PsaltyDS, that clarifies a lot of things that I didn't know about bit stuff...

My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
Link to comment
Share on other sites

Thanks PsaltyDS, that clarifies a lot of things that I didn't know about bit stuff...

You're welcome. :)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
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...