Jump to content

inputbox - CAPS as default case?


Recommended Posts

This is a bit ugly, but it works:

Opt("GUIOnEventMode",1)
Global $string=""
GUICreate("Hello",300,200)
$edit=GUICtrlCreateEdit("",10,10,280,180)
GUISetOnEvent(-3,"close")
GUISetState()
while 1
    If $string<>GUICtrlRead($edit) Then
        GUICtrlSetData($edit,StringUpper(GUICtrlRead($edit)))
        $string=GUICtrlRead($edit)
    EndIf
    
    sleep(10)
WEnd

FUnc close ()
Exit
EndFunc

:)

Broken link? PM me and I'll send you the file!

Link to comment
Share on other sites

Or the easy way...

#include <GUIConstants.au3>
GUICreate("Hello",300,200)
$edit=GUICtrlCreateEdit("",10,10,280,180,BitOR($GUI_SS_DEFAULT_EDIT,$ES_UPPERCASE))
GUISetState()

Do
    $nMsg = GUIGetMsg()
Until $nMsg = $GUI_EVENT_CLOSE
Heh, I give... This one's way better :)

My active project(s): A-maze-ing generator (generates a maze)

My archived project(s): Pong3 (Multi-pinger)

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...