Post by KHA » 18 May 2020, 07:42
nacken012 wrote: ↑18 May 2020, 07:17
Vielen Dank, das klappt mit der Msgbox Anzeige super, aber irgendwie bin ich wohl zu blöd das in 4 Variablen zu speichern.
Die sind bereits in Variablen gespeichert und es sind in deinem Beispiel 5 Variablen
z.B
Code: Select all
OCR := "(13318 @ x12838 x12936 x11462 x12580"
Anzahl := (Zahlen := StrSplit(Trim(RegExReplace(OCR, "\D+", " ")), " "))
; Array Version
MsgBox, % Anzahl[1]
MsgBox, % Anzahl[2]
MsgBox, % Anzahl[3]
MsgBox, % Anzahl[4]
MsgBox, % Anzahl[5]
; oder in Variable speichern
For Each, Zahl In Zahlen
Var_%A_index% = %Zahl%
MsgBox, % Var_1
MsgBox, % Var_2
MsgBox, % Var_3
MsgBox, % Var_4
MsgBox, % Var_5
[quote=nacken012 post_id=329622 time=1589804259 user_id=70781]
Vielen Dank, das klappt mit der Msgbox Anzeige super, aber irgendwie bin ich wohl zu blöd das in 4 Variablen zu speichern.
[/quote]
Die sind bereits in Variablen gespeichert und es sind in deinem Beispiel 5 Variablen
z.B
[code]OCR := "(13318 @ x12838 x12936 x11462 x12580"
Anzahl := (Zahlen := StrSplit(Trim(RegExReplace(OCR, "\D+", " ")), " "))
; Array Version
MsgBox, % Anzahl[1]
MsgBox, % Anzahl[2]
MsgBox, % Anzahl[3]
MsgBox, % Anzahl[4]
MsgBox, % Anzahl[5]
; oder in Variable speichern
For Each, Zahl In Zahlen
Var_%A_index% = %Zahl%
MsgBox, % Var_1
MsgBox, % Var_2
MsgBox, % Var_3
MsgBox, % Var_4
MsgBox, % Var_5
[/code]