Jump to content

Emulate Product Key field in Windows


doestergaard
 Share

Go to solution Solved by UEZ,

Recommended Posts

Hi

First off, I want to thank this community for being so much helpful, I really appreciate it! I'm not a hardcore autoit scripter and therefore need your expertise to crack this one.

The following code works:

Func _Options()

  Local $myGUI = GUICreate("ProductKeyInput", 412, 240, -1, -1, $WS_CAPTION)
  Local $inputKey = GUICtrlCreateInput("", 39, 41, 260, 24, $ES_UPPERCASE)
  GUICtrlSetLimit($myInput, 29, 0)
  GUISetState()

  While ControlFocus("", "", $myInput)

    Local $stringKey = GUICtrlRead($inputKey)

    Switch StringLen($stringKey)
    
      Case 5

        ControlSend("", "", $inputKey, "-")

    EndSwitch

  WEnd

EndFunc

But because that i checks constantly if the stringlen is 5 then you'll have a big problem with using the backspace key.

Is it possible to emulate the product key field entirely from Windows so that you are able to use the backspace key ?

Product-Key-Windows-8.jpg

Thanks!

Edited by doestergaard
Link to comment
Share on other sites

  • Solution

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

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