Jump to content

strange lowercase problem


wonder
 Share

Recommended Posts

Hi,

I have a problem with an input control, when reading the input control(GUICtrlRead) from an inputfield with the options $ES_MULTILINE & $ES_PASSWORD all charecter typed in the inputfield are converted to lowercase. If i remove the $ES_MULTILINE option then everything is ok. (If i type lowercase or uppercase or a combination of both i get the exact value typed in the inputfield)

a piece of the code

CODE
$e = GUICtrlCreateInput ( "", 200, 170, 200, 31, $ES_MULTILINE & $ES_PASSWORD )

$PassWd = GUICtrlRead ( $e )

MsgBox(0, "Passwd", $PassWd)

Have anybody came across this problem??

Any suggestion??

THanks in advance

Wonder

Link to comment
Share on other sites

The problem is here:

$e = GUICtrlCreateInput ( "TEST", 5, 5, 390, 50, $ES_MULTILINE & $ES_PASSWORD )

Should be:

$e = GUICtrlCreateInput ( "TEST", 5, 5, 390, 50, BitOr($ES_MULTILINE,$ES_PASSWORD))

#include <GUIConstants.au3>

GuiCreate("GUI", 400, 100)
GuiSetState(@SW_SHOW)

$e = GUICtrlCreateInput ( "TEST", 5, 5, 390, 50, BitOr($ES_MULTILINE,$ES_PASSWORD))
$myButton = GuiCtrlCreateButton("GO", 165, 70,50)


While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            ExitLoop
        Case $myButton
            $PassWd = GUICtrlRead ( $e )
            MsgBox(0, "Passwd", $PassWd)
    EndSwitch
Wend
Edited by weaponx
Link to comment
Share on other sites

The problem is here:

$e = GUICtrlCreateInput ( "TEST", 5, 5, 390, 50, $ES_MULTILINE & $ES_PASSWORD )

Should be:

$e = GUICtrlCreateInput ( "TEST", 5, 5, 390, 50, BitOr($ES_MULTILINE,$ES_PASSWORD))

#include <GUIConstants.au3>

GuiCreate("GUI", 400, 100)
GuiSetState(@SW_SHOW)

$e = GUICtrlCreateInput ( "TEST", 5, 5, 390, 50, BitOr($ES_MULTILINE,$ES_PASSWORD))
$myButton = GuiCtrlCreateButton("GO", 165, 70,50)


While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            ExitLoop
        Case $myButton
            $PassWd = GUICtrlRead ( $e )
            MsgBox(0, "Passwd", $PassWd)
    EndSwitch
Wend

[/quote

Thanks for your reaction, but that didn't for me. The inputbox just displays the character when typing in the inputbox.

Actually i was trying to use the style and extended style parameter, but that doest'n work. I've decided to let go of the extended styles.

I've use the BitOr function you came up with.

CODE
GUICtrlCreateInput ( "", 200, 230, 200, 31, BitOR($GUI_SS_DEFAULT_INPUT, $ES_PASSWORD), $ES_MULTILINE)
Thanks
Link to comment
Share on other sites

It works fine. If you look at my example, the word "TEST" is in capital letters. When you click the button a messagebox pops up showing...you guessed it "TEST".

The characters do in fact retain their case.

Hmm forgot about the whole password thing.

This should work but doesn't show asterisks:

#include <GUIConstants.au3>

GuiCreate("GUI", 400, 100)
GuiSetState(@SW_SHOW)

$e = GUICtrlCreateEdit ( "Test", 5, 5, 390, 50,$ES_PASSWORD)
$myButton = GuiCtrlCreateButton("GO", 165, 70,50)

While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            ExitLoop
        Case $myButton
            $PassWd = GUICtrlRead ( $e )
            MsgBox(0, "Passwd", $PassWd)
    EndSwitch
Wend
Edited by weaponx
Link to comment
Share on other sites

Hi,

I guess the problem is that multiline and $ES_Password don't fit together.

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...