Jump to content
Sign in to follow this  

Input control question...

Recommended Posts


Sorry, the first time gave me an error and don't ralise it was posted...

Don't now how to delete this one...

Hi, first of all sorry for my bad english.

I am new on autoIt and i have this question...

Posted ImagePosted Image

On that GUI, when i am typing in the input and press enter, how can i make to call a function??

The function is the same tath the "Send" button do...


En castellano:

Como hago para que cuando estoy tipeando en el input y doy enter llame a la misma funcion que se llama cuando apreto el boton "send"


Edited by Chapi

Share this post

Link to post
Share on other sites

The best way is to post your code and someone will make the necessary modification. I can give you a general example but it might not help you so much.


#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

Opt("GUIOnEventMode", 1)
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 303, 92, 193, 125)
GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close")
$Input1 = GUICtrlCreateInput("Input1", 30, 25, 151, 21)
GUICtrlSetOnEvent(-1, "Button1Click")   ;just use the same function name as the one called by button1
$Button1 = GUICtrlCreateButton("Send", 210, 25, 76, 21, 0)
GUICtrlSetOnEvent(-1, "Button1Click")
#EndRegion ### END Koda GUI section ###

While 1

Func Button1Click()
    MsgBox(0, "Input Content", GUICtrlRead($Input1))
Func Form1Close()

SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

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