Jump to content



Photo

Input Field on Gui


  • Please log in to reply
4 replies to this topic

#1 PPowerHouseK

PPowerHouseK

    Seeker

  • Active Members
  • 21 posts

Posted 11 January 2011 - 10:56 PM

Hello all,

I am pretty new with AutoIT so please bear with me. I basically need to make and inputbox on the main gui itself. I have a working version of what I need to do, but currently it uses a pop-up inputbox. I was wondering if there is a way to enter the information directly into the main gui without having another window pop up to take the user's input. Any help would be much appreciated on this.

Thanks in advance.







#2 Melba23

Melba23

    I'm old - what's your excuse?

  • Moderators
  • 22,986 posts

Posted 11 January 2011 - 10:59 PM

PPowerHouseK,

I assume you have been using InputBox - just create an input control on the GUI with GUICtrlCreateInput and use that instead. :x

M23
My UDFs:
Spoiler

#3 PPowerHouseK

PPowerHouseK

    Seeker

  • Active Members
  • 21 posts

Posted 11 January 2011 - 11:17 PM

Thanks so much for the quick reply!

So I placed the following snippet in my gui code, but for some reason the value returned no matter what is entered, is 43.
;Name field $who = GUICtrlCreateInput("Name",10,270,100)


Perhaps I am making a mistake with my syntax, I am not sure.

#4 Melba23

Melba23

    I'm old - what's your excuse?

  • Moderators
  • 22,986 posts

Posted 11 January 2011 - 11:21 PM

PPowerHouseK,

The 43 is the ControlID of the input control. You need to code like this: :P
; Create the input control and get the ControlID $hInput_Name = GUICtrlCreateInput("Name",10,270,100) ; Read the content of the control when you need it $sName = GUICtrlRead($hInput_Name)

All clear now? :x

M23
My UDFs:
Spoiler

#5 PPowerHouseK

PPowerHouseK

    Seeker

  • Active Members
  • 21 posts

Posted 11 January 2011 - 11:35 PM

I see what you did there. Thanks, yet again!


Also I just downloaded all those apps in your signature that I've been looking for, thanks for that.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users