Jump to content

Newbie question


Recommended Posts

I am trying to control a button where the text is ("Raise(3)")the numeric amount changes 3,6,9,12,  control ID stays the same as well as the button.  How do I make it read all the changes?

litljon

<{POST_SNAPBACK}>

Have you tried using ControlGetText()? Or am I completely missing what you are asking?
Link to comment
Share on other sites

I am trying to control a button where the text is ("Raise(3)")the numeric amount changes 3,6,9,12,  control ID stays the same as well as the button.  How do I make it read all the changes?

litljon

<{POST_SNAPBACK}>

#include <GUIConstants.au3>
GUICreate("Button Test", 100, 130)

$var = 3
$btnRaise = GUICtrlCreateButton ("Raise(" & $var & ")",  20, 20, 70)
GUISetState()

while 1
    $msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop   
    If $msg = $btnRaise then
        $var = $var + 3
        GUICtrlSetData($btnRaise, "Raise(" & $var & ")")  
    EndIf
sleep(10)
Wend

That what you mean? If you want to read the change just read $var.

Hope that helps.

Link to comment
Share on other sites

  • Moderators

I think he's trying to read it off an application Nez...

If the ControlGetText() doesn't work...

Does the ControlNameNN change at all?

If so, try LxP's _ControlGetHandleByPos()

#97861

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

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