Jump to content
Sign in to follow this  
twbradio

Carriage Return on an Input Box

Recommended Posts

twbradio

I have an application that presents a row of iclons and an input box for the user to use for certain support functions at a corporate site. I use on event mode to process commands. Is there a way to determine if the carriage return has been pressed in the input box so that a function can be performed. I have searched the forum and the help file in the past, but the words carriage, return and enter are a bit too common ;) .

Thank you,

Tom Brown


Anyone have a TRS 80 Model III for sale?

Share this post


Link to post
Share on other sites
BigDod

I have an application that presents a row of iclons and an input box for the user to use for certain support functions at a corporate site. I use on event mode to process commands. Is there a way to determine if the carriage return has been pressed in the input box so that a function can be performed. I have searched the forum and the help file in the past, but the words carriage, return and enter are a bit too common ;) .

Thank you,

Tom Brown

You could always put a button on your GUI and make it the default button, thus when enter is hit it presses the button.


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites
w0uter

You could always put a button on your GUI and make it the default button, thus when enter is hit it presses the button.

inputbox has more priority to capture the enter key then a default button.


My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll

Share this post


Link to post
Share on other sites
seandisanti

I have an application that presents a row of iclons and an input box for the user to use for certain support functions at a corporate site. I use on event mode to process commands. Is there a way to determine if the carriage return has been pressed in the input box so that a function can be performed. I have searched the forum and the help file in the past, but the words carriage, return and enter are a bit too common ;) .

Thank you,

Tom Brown

either of the two suggestions posted would work, or if you REALLY wanted to reinvent the wheel and waste processor time, you could make an adlib function that uses _IsPressed() to watch for the enter key...personally i'd go with the default button solution if there's a button that does the same thing as enter, if no button, use the hotkey to call the function...

Share this post


Link to post
Share on other sites
seandisanti

inputbox has more priority to capture the enter key then a default button.

wouldn't that only be true if it's a multi-line?

Share this post


Link to post
Share on other sites
twbradio

:"> I knew this would happen ... so I searched for the default button in the help file and got a ton of results, but didn't see what I was looking for. I had come to the conclusion that the default button was a vicious rumor that I had tortured myself with. For some reason I didn't think to look at the GUICTRLSetState entry until I searched for default button encased in quotes. :"> So, the default button idea works just fine. Thank you for your input. I've spent so much time on some of the more radical portions of the new language that I have obviously missed a few of the basics.

Tom

wouldn't that only be true if it's a multi-line?


Anyone have a TRS 80 Model III for sale?

Share this post


Link to post
Share on other sites
w0uter

i experienced otherwise. but maby he will have more luck then me.

[edit] my memory was wrong: http://www.autoitscript.com/forum/index.ph...topic=14926&hl= [/edit]

Edited by w0uter

My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll

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  

×