Jump to content

Extracting an integer value


Recommended Posts

Hello all,

I am trying to extract the an integer value for a window as shown in the attachment.

I have been able to extract it as a text value. But I need to be able to extra it as an integer value so that I can manipulate it.

Any help would be greatly appreciated.

Thanks

post-63510-0-52911300-1299393869_thumb.p

Link to comment
Share on other sites

AutoIt uses variant type for the variables. Therefore you don't need to convert it explicit to an integer, but you can do it like this:

$Integer = Int($String)

Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the Universe
trying to produce bigger and better idiots.
So far, the Universe is winning.

Link to comment
Share on other sites

Thanks for your reply. I think I may be referencing the wrong location to pull the value from. I am able to get to the specified location and change the value if needed. But I still dont know which command to use to pull the value from the box. The MsgBox is just to check the value that is returned, which returns 0 no matter what number is in the box.

WinWaitActive("Account lockout threshold Properties")

$Integer = WinGetText("Account lockout threshold Properties")

$Integer = int($Integer)

MsgBox(0, "", $Integer)

Link to comment
Share on other sites

Have a look at ControlGetText and the AutoIt Window Info tool coming with AutoIt.

Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the Universe
trying to produce bigger and better idiots.
So far, the Universe is winning.

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...