Hallo,
ich möchte, dass Namen in Zahlen umgewandelt werden , d.h. wenn z.B. ABC eingegeben wird, dann wird 123 in die Edit Box geschrieben.
A = 1
B = 2
C = 3
D = 4
......
Wie kann ich es z.b. machen, dass er auf den ersten Buchstabe achtet und nicht auf das ganze Wort?
Hier mal mein Versuch :
Spoiler anzeigen
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
$Form = GUICreate("Testform", 266, 130, 192, 124)
$Name = GUICtrlCreateLabel("Name", 8, 8, 32, 17)
$Inputbox = GUICtrlCreateInput("", 48, 8, 121, 21)
$Ok = GUICtrlCreateButton("Ok", 184, 8, 75, 25, $WS_GROUP)
$Edit = GUICtrlCreateEdit("", 8, 40, 249, 81)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Ok
Switch GUICtrlRead ($Inputbox)
case "a"
GUICtrlSetData($Edit,"1")
case "b"
GUICtrlSetData($Edit,"2")
case "c"
GUICtrlSetData($Edit,"3")
Endswitch
EndSwitch
WEnd
Könntet ihr mir da bitte helfen?