Jump to content

bitAND magic numbers help


Recommended Posts

good day,

Please I need a little help ive been trying to find where I got this magic number and I remember it was for Minimize, but I really dont remember where I got this. Last thing I remember i was reading the help file and saw this minize magic numbers, but I cant find it anymore, I dnt wnt to use this magic number anymore OMG! please help...

here it is.

Local $hAaSf = "C:\Main.xlsx" ;Main excel
Local $iStateAsf = WinGetState($hAaSf)
BitAND($iStateAsf, 16)

 

ill get to that... i still need to learn and understand a lot of codes graduated.gif

Correct answer, learn to walk before you take on that marathon.

Link to comment
Share on other sites

From the WinGetState helpfile and its example script:

Quote

$WIN_STATE_MINIMIZED (16) = Window is minimized

(...)

If BitAND($iState, 16) Then
    MsgBox($MB_SYSTEMMODAL, "", "Notepad is minimized and the state returned by WinGetState was - " & $iState)

 

According to the helpfile, you can also use $WIN_STATE_MINIMIZED, but I can't find that anywhere so either I'm missing something or the helpfile is wrong there. So I guess you're forced to just take that magic number from the help file or define your own constants.

Roses are FF0000, violets are 0000FF... All my base are belong to you.

Link to comment
Share on other sites

There is a ticket, although I don't see much of a description. https://www.autoitscript.com/trac/autoit/attachment/ticket/3216/WinGetState Example.au3

Indeed the statement - Constants are defined in "AutoItConstants.au3" - is misleading. I'm not sure if they belong there anyway.

Link to comment
Share on other sites

This is a bug and has been fixed in the latest revision of AutoIt: https://www.autoitscript.com/trac/autoit/ticket/3116

You would have to wait for another release if you want to use $WIN_STATE_* constants ;).

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

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

×
×
  • Create New...