删除右起一个字节写法:
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 238, 201, 314, 131)
$Input = GUICtrlCreateInput("454222545242", 40, 40, 121, 21)
$Button1 = GUICtrlCreateButton("←", 72, 112, 75, 25)
GUICtrlSetFont(-1, 25, 400, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
Local $Read = GUICtrlRead($Input)
Local $sString = StringTrimRight($Read, 1) ; 删除字符串右起 1个字符.
GUICtrlSetData($Input, $sString)
EndSwitch
WEnd
|