Detecting Gui Edit Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
aliztori
Posts: 119
Joined: 19 Jul 2022, 12:44

Detecting Gui Edit

Post by aliztori » 13 Aug 2022, 14:06

I want it to recognize what I wrote when I write my text so that the operation can be executed without pressing a button

Code: Select all


Gui,Add,Edit,x5 w90 vValue

; Gui, +AlwaysOnTop +ToolWindow ; No minimize button
Gui, +AlwaysOnTop -Caption
Gui,Show,w100 h35

If (vValue = 5)
	msgbox,s
Return

wetware05
Posts: 750
Joined: 04 Dec 2020, 16:09

Re: Detecting Gui Edit

Post by wetware05 » 13 Aug 2022, 14:41

Hi. :wave:

Why? And how does Autohotkey know that you have finished entering text? At least you have to accept that you press enter.

aliztori
Posts: 119
Joined: 19 Jul 2022, 12:44

Re: Detecting Gui Edit

Post by aliztori » 13 Aug 2022, 16:56

wetware05 wrote:
13 Aug 2022, 14:41
Hi. :wave:

Why? And how does Autohotkey know that you have finished entering text? At least you have to accept that you press enter.
Fasting
and i just want to add One number to textbox

wetware05
Posts: 750
Joined: 04 Dec 2020, 16:09

Re: Detecting Gui Edit

Post by wetware05 » 13 Aug 2022, 17:44

It is done with the command ControlGet https://www.autohotkey.com/docs/commands/ControlGet.htm, the solution on this page (by mikeyww) may work for you: viewtopic.php?style=19&t=95906

User avatar
boiler
Posts: 16925
Joined: 21 Dec 2014, 02:44

Re: Detecting Gui Edit

Post by boiler » 13 Aug 2022, 18:54

By the way, the name of the variable you associated with the the Edit control is not vValue as in your statement If (vValue = 5). It’s just Value. The first v is the option letter that says what follows is the variable name. It’s not part of the variable name.

wetware05
Posts: 750
Joined: 04 Dec 2020, 16:09

Re: Detecting Gui Edit  Topic is solved

Post by wetware05 » 13 Aug 2022, 18:56

Hi, aliztori.

Your request would look like this:

Code: Select all

Settimer, CtrlGet, 250

gui, add, edit, number w100 vValue
gui, show,, Edit Text
return

CtrlGet:
guiControlGet, txtVar,, Value
If (txtVar !="")
  {
  Msgbox, Your variable is saved with the name of txtVar: %txtVar%
  Settimer, CtrlGet, off
  gui, destroy
  }
return

Post Reply

Return to “Ask for Help (v1)”