Is there any way to control the text within a gui without having to code every single letter of the keyboard?
All help and guidance is appreciated.
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
#Persistent
#SingleInstance Force
gui, add, text, xm ym w300 center, This is my text gui
gui, add, text, xm y+20 wp center vMyText,
gui, add, button, gReset_gui, Reset
gui, show,, Text_Control_gui
return
#IfWinActive, Text_Control_gui
Numpad0::
DisplayText .= "0"
Guicontrol, text, MyText, %DisplayText%
return
Numpad1::
DisplayText .= "1"
Guicontrol, text, MyText, %DisplayText%
return
Numpad2::
DisplayText .= "2"
Guicontrol, text, MyText, %DisplayText%
return
Numpad3::
DisplayText .= "3"
Guicontrol, text, MyText, %DisplayText%
return
#IF ; Ends the "If" statement
Reset_gui:
DisplayText :=
Guicontrol, text, MyText, %DisplayText%
return
GuiClose:
Esc::
ExitApp