Jump to content

How to lock input in a textbox


Recommended Posts

I tried Blockinput(1) but that didn't seem to work. Thing is, i have GUI textbox to show which button to press, lets say "F" but i don't want myself to write anything in it once it is compiled...

GUICtrlCreateLabel("Press", 2, 10)

$key1 = GUICtrlCreateInput("F", 65, 8, 120)

Edited by shadedNabz
Link to comment
Share on other sites

not working :/

It works for me. Try it again. Example:

#include <GUIConstants.au3>
#include <EditConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 300, 200, -1, -1)
GUICtrlCreateLabel("Press", 2, 10)
$key1 = GUICtrlCreateInput("F", 65, 8, 120, 21, $ES_READONLY)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

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

    EndSwitch
WEnd

#include <ByteMe.au3>

Link to comment
Share on other sites

Ok this is what the msg box says...

autoit error

$key1 = GUICtrlCreateInput("F", 65, 8, 120, $ES_READONLY)

$key1 = GUICtrlCreateInput("F", 65, 8, 120, ^ERROR

Error:Variable used without being declared

EDIT: do i need special version of autoit for this fuction to work? because that function doesn't show up as a suggestion when i'm typing it down

Edited by shadedNabz
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...