Jump to content
Sign in to follow this  
Hypertrophy

how to make inputbox mandatory

Recommended Posts

Hypertrophy

how to i make the user type something. like they can't hit ok if there is nothing in the input?

Share this post


Link to post
Share on other sites
AoRaToS

When ok is pressed you read the contents of the inputbox and you only do something if it's not empty...You can check the helpfile about reading contents :)

Now, if you want the ok to be disabled until something is in the inputbox you probably have to poll the inputbox every so on to see if there's something in, or there must be some message being sent when you type which you have to capture..

Edited by AoRaToS

s!mpL3 LAN Messenger

Current version 2.9.8.8 [30/09/2015]

Download Here

s!mpL3

Share this post


Link to post
Share on other sites
Hypertrophy

there's a simpler way to do this. i dont understand this in the helpfile and i think its the key:

The second and subsequent characters of the password field can be used to restrict input. Use a space to fill the first character to still see the characters typed. Putting an M after the first character indicates that input is Mandatory; i.e. you must enter something. Nothing will happen if you press the Ok button when there is nothing in the InputBox. It will not close and return the string.

Share this post


Link to post
Share on other sites
bogQ

there's a simpler way to do this. i dont understand this in the helpfile and i think its the key:

The second and subsequent characters of the password field can be used to restrict input. Use a space to fill the first character to still see the characters typed. Putting an M after the first character indicates that input is Mandatory; i.e. you must enter something. Nothing will happen if you press the Ok button when there is nothing in the InputBox. It will not close and return the string.

$input = InputBox("Pls tupe anything...","...to the inputbox",""," M")
:)

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites
bogQ

Did you scroll further down and look at the example given for this?

i did, why?

edit: lol sry i tought that you asked me :/

Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites
Jos

i did, why?

nah.. this remark is intended for the OP, not for you. I just took too long to hit the "add reply" button :) Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Hypertrophy

$input = InputBox("Pls tupe anything...","...to the inputbox",""," M")
:)
Yes,Thanks.

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.