Jump to content
Sign in to follow this  

Emulate Product Key field in Windows

Recommended Posts



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)

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

    Local $stringKey = GUICtrlRead($inputKey)

    Switch StringLen($stringKey)
      Case 5

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




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 ?



Edited by doestergaard

Share this post

Link to post
Share on other sites

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!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post

Link to post
Share on other sites

That worked like a charm!

Thx a lot  :sorcerer:

Share this post

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
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.