Jump to content

Recommended Posts

Hey all,


I am having a weird bug when I have my password limit set 15 max 8 minimum I have several users noting it locks at 14 characters instead of 15. Has anyone seen a similiar issue with GuiCtrlSetLimit?

I generate a error on line 6656 (when I expand all the code out its the password portion opening a connection to AD (meaning they didnt enter their correct password)

Here is the snippet of the code(I am thinking people have longer than 15 character passwords is what happened, but sometimes a copy and paste of their password resolves the issue)

GUICtrlCreateLabel("Admin Password", 5, 30)
    $Pass = GUICtrlCreateInput("", 100, 30, 120, -1, $ES_PASSWORD)
    GUICtrlSetLimit($Pass, 15, 8)
GUICtrlCreateLabel("Regular Password", 5, 80)
    $Pass1 = GUICtrlCreateInput("", 100, 80, 75, -1, $ES_PASSWORD)
    GUICtrlSetLimit($Pass1, 8, 8)

Now Regular password field works fine and the password limit has no issue (static 8 characters)

The admin password field currently is in a transition from 8 to 15 character limit. Sometimes the maximum number users are able to enter is 14. Otherwise they can type 15 the rest of the time. 

I may need to dig further on these users as I just cant seem to replicate it on my end so I am wondering if they are just having moments with their passwords >< none the less i rather ask if someone has seen a similar issue.

Link to post
Share on other sites

I can't replicate either.  My guess would be some of the users are copying and pasting an extra white space ... not sure :think:.  Maybe you could listen on the input event and if there is a white space detected message box the user that they need to try again?  The code below seems to enforce the 15 character limit.

#include <GUIConstantsEx.au3>
#include <MsgBoxConstants.au3>
#include <WindowsConstants.au3>

; Create a GUI with various controls.
Local $hGUI = GUICreate("Example")

GUICtrlCreateLabel("Admin Password", 5, 30)

;$Pass = GUICtrlCreateInput("", 100, 30, 120, -1, $ES_PASSWORD)
GUICtrlSetLimit($Pass, 15, 8)

; Display the GUI.
GUISetState(@SW_SHOW, $hGUI)

While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE, $idOK



Edited by Jfish

Build your own poker game with AutoIt: pokerlogic.au3 | Learn To Program Using FREE Tools with AutoIt

Link to post
Share on other sites

thats the idea was to enforce it, i alleviated most of the user issues as most of them were in fact recording an extra space. The one throwing me off is 1 single person who was recording 14 character strokes but blocking at the 15th so they could never log in. But I was able to get that user to log in after redoing it a few times. I am going to assume the users were just not doing what was needed properly.

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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...