shadedNabz Posted July 28, 2011 Share Posted July 28, 2011 (edited) 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 July 28, 2011 by shadedNabz Link to comment Share on other sites More sharing options...
DarkestHour Posted July 28, 2011 Share Posted July 28, 2011 (edited) You would use $ES_READONLY like this GUICtrlCreateEdit("Test", 7, 526, 296, 99, $ES_READONLY) ; or GUICtrlCreateInput("Test", 7, 526, 296, 99, $ES_READONLY) Edit: with your edited in Snippet: GUICtrlCreateLabel("Press", 2, 10) $key1 = GUICtrlCreateInput("F", 65, 8, 120, $ES_READONLY) Edited July 28, 2011 by DarkestHour Link to comment Share on other sites More sharing options...
shadedNabz Posted July 28, 2011 Author Share Posted July 28, 2011 (edited) not working :/ Edited July 28, 2011 by shadedNabz Link to comment Share on other sites More sharing options...
JohnOne Posted July 28, 2011 Share Posted July 28, 2011 why AutoIt Absolute Beginners  Require a serial  Pause Script  Video Tutorials by Morthawt  ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
sleepydvdr Posted July 28, 2011 Share Posted July 28, 2011 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 More sharing options...
shadedNabz Posted July 28, 2011 Author Share Posted July 28, 2011 (edited) 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 July 28, 2011 by shadedNabz Link to comment Share on other sites More sharing options...
DarkestHour Posted July 28, 2011 Share Posted July 28, 2011 Sorry, $ES_Readonly needs #include <EditConstants.au3> at the beginning of a script. Also, the input doesnt have the right number of parameters, i did not fix that when i made your example, should be $key1 = GUICtrlCreateInput("F", 65, 8, 120, 24, $ES_READONLY) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now