Jump to content

TEXTBOX


ironh4x
 Share

Recommended Posts

  • Developers

I'm making a HOTKEY program that the user can change what HOTKEY they want to set.

situation:

I want that when the user press alt,shift or ctrl, the text box will display "ALT+" and the letter they want.

Should be doable .... so what is your question, what do you have already and where did you get stuck?

Merry Christmas

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Thank you and Merry Christmas to you xD

I included the code that I have already written. this code in only fix to Alt+ any letter you want that is why my textbox only contain the letter you want and it will updated every time you hit the close button not the "shutdown". I want it to more flexible, instead of only the letter. you can also choose from ctrl,shft or alt. so the textbox should be display "ALT +" when alt is press, "CTRL+" when ctrl is press and "SHFT+" when shift is press. then any letter or character you want to include.

the final the you should see on the textbox is ex: "ALT+D" or "ALT+d" any will do and it is fix to that output, if you press alt+d then alt+s it should be alt+s not alt+ds

sorry for my bad english

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

Opt("TrayAutoPause",0)

HotKeySet("!{esc}", "showxp")
$gui=GUICreate("Garena Experience Meter", 300, 300, -1, -1, BitOr($WS_CAPTION, $WS_POPUP, $WS_SYSMENU))
$bt1 = GUICtrlCreateButton('Shutdown', 5, 5, 80, 25)
GUICtrlCreateLabel("HOTKEY", 10, 50)
$var = RegRead("HKLM64\SOFTWARE\Test", "TestKey")
if $var ="" Then

$key1 = GUICtrlCreateInput("d", 100, 50, 80, 20,$ES_CENTER )
GUICtrlSetLimit(-1, 1)

Else

$key1 = GUICtrlCreateInput($var, 100, 50, 80, 20,$ES_CENTER )
GUICtrlSetLimit(-1, 1)

EndIf



HotKeySet("!" & GUICtrlRead($key1), "msgbox1")

while 1
    
    
    WEnd

func msgbox1()
    msgbox(0,"",GUICtrlRead($key1))
    EndFunc

Func showxp()
        
        GUISetState(@SW_SHOW,$gui)

        While 1
            $gm = GUIGetMsg()
            Switch $gm
            Case $GUI_EVENT_CLOSE
                $var=RegWrite("HKLM64\SOFTWARE\Test", "TestKey", "REG_SZ", GUICtrlRead($key1))
                GUISetState(@SW_HIDE, $gui)
                run(@ScriptDir & "\" & @ScriptName)
                exit
            Case $bt1
                exit
            EndSwitch
        WEnd
    EndFunc
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...