Jump to content
Sign in to follow this  
litljon

Newbie question

Recommended Posts

litljon

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

Share this post


Link to post
Share on other sites
AutoChris

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?

Share this post


Link to post
Share on other sites
Nezoic

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.

Share this post


Link to post
Share on other sites
SmOke_N

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.

Share this post


Link to post
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
Sign in to follow this  

×