Jump to content

use GUICtrlCreateInput no need button and send data ?


abiteric
 Share

Recommended Posts

#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 211, 143, 659, 618)
$Input1 = GUICtrlCreateInput("Input1", 64, 24, 129, 21)
$Input2 = GUICtrlCreateInput("Input2", 64, 56, 129, 21)
$Label1 = GUICtrlCreateLabel("text_1", 16, 24, 33, 17)
$Label2 = GUICtrlCreateLabel("text_2", 16, 56, 33, 17)
$Button1 = GUICtrlCreateButton("Button1", 64, 96, 81, 33, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

if i want to type something in $Input1 and after press ENTER by Posted Image(no keyboard) then focus to $input2

how can i make it ? need some help....

ps: don`t use InputBox

My website about Y-mate 網拍輔助程式 : http://www.L2play.comMy Blog ( Tranditional Chinese ) 開發小組的部落格 : http://tw.myblog.yahoo.com/play19990909

Link to comment
Share on other sites

#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 211, 143, 659, 618)
$Input1 = GUICtrlCreateInput("Input1", 64, 24, 129, 21)
$Input2 = GUICtrlCreateInput("Input2", 64, 56, 129, 21)
$Label1 = GUICtrlCreateLabel("text_1", 16, 24, 33, 17)
$Label2 = GUICtrlCreateLabel("text_2", 16, 56, 33, 17)
$Button1 = GUICtrlCreateButton("Button1", 64, 96, 81, 33, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

if i want to type something in $Input1 and after press ENTER by

ps: don`t use InputBox

One way is with an accelerator

#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 211, 143, 659, 618)
$Input1 = GUICtrlCreateInput("Input1", 64, 24, 129, 21)
$Input2 = GUICtrlCreateInput("Input2", 64, 56, 129, 21)
$Label1 = GUICtrlCreateLabel("text_1", 16, 24, 33, 17)
$Label2 = GUICtrlCreateLabel("text_2", 16, 56, 33, 17)
$Button1 = GUICtrlCreateButton("Button1", 64, 96, 81, 33, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

Dim $AccelKeys[1][2]=[["{ENTER}", $Input1]]
GUISetAccelerators($AccelKeys)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Input1
                ControlFocus($Form1,"","Edit2")
                Send("{END}")
            
    EndSwitch
WEnd
Edited by martin
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
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...