Detect text on a button Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Dannyou
Posts: 4
Joined: 25 Apr 2018, 08:55

Detect text on a button

25 Apr 2018, 09:09

Hello,

How do I get my code to detect in the text of this button whether the number is 0 or not?
Attachments
Sem título.png
Sem título.png (68.63 KiB) Viewed 1473 times
Dannyou
Posts: 4
Joined: 25 Apr 2018, 08:55

Re: Detect text on a button

26 Apr 2018, 09:45

Can someone help me?
awel20
Posts: 211
Joined: 19 Mar 2018, 14:09

Re: Detect text on a button  Topic is solved

26 Apr 2018, 10:21

:idea: To get the text

Code: Select all

; Get the text from the control
ControlGetText, MyText, ClaPrompt_01000000H1, ahk_class ClaWin01000000H_9

; Display the result
MsgBox, % MyText
To check the last character for a zero

Code: Select all

ExampleText := "asdf qwerty 0"

; If the last character is "0"
if (SubStr(ExampleText, 0) = "0")
{
    MsgBox Zero detected
}
else
{
    MsgBox No Zero detected
}
Dannyou
Posts: 4
Joined: 25 Apr 2018, 08:55

Re: Detect text on a button

26 Apr 2018, 11:56

Ow, thanksssss!

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: sachinme and 362 guests