AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

auto leaving a gui add edit control

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Mountie



Joined: 30 Oct 2007
Posts: 13

PostPosted: Fri Jun 20, 2008 1:59 pm    Post subject: auto leaving a gui add edit control Reply with quote

Is it possible to leave a control once the maxium number of characters
have been input for the control without having to press the tab key?

I have a line in a script as follows:
Gui, Add, Edit, vLocation Limit1

The issue is that the tab key needs to be pressed to leave the control
after the single charcter has been input. In this case, it would be more
desirable to just go to the next field after the single character has been
input.

Thanks.
Back to top
View user's profile Send private message
engunneer



Joined: 30 Aug 2005
Posts: 6847
Location: Pacific Northwest, US

PostPosted: Fri Jun 20, 2008 3:53 pm    Post subject: Reply with quote

you could ad a g-label option to the edit, and that subroutine would read the field, and if it is filled with the required number of chars (1 in this case) then set focus on the next control

GuiControlGet will et you get the text
GuiControl will let you move the focus.
_________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group