To parse the value entered in the editbox.

Get help with using AutoHotkey and its commands and hotkeys
chngrcn
Posts: 84
Joined: 29 Feb 2016, 08:55

To parse the value entered in the editbox.

16 Feb 2018, 09:02

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus



Hello

in the above code I want to do;

I want to parse the value entered in the main table box.

"*" to decompose the values up.


the result will be:

main table = EB542219*34JP6237*40372894838

edi1 = EB542219
edi2 = 34JP6237
edi3 = 40372894838

thank you for your help.
Odlanir
Posts: 274
Joined: 20 Oct 2016, 08:20

Re: To parse the value entered in the editbox.

16 Feb 2018, 09:35

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

____________________________________________________________________________
Windows 7 Home Premium 64 bit - Autohotkey v1.1.24.02 64-bit Unicode
chngrcn
Posts: 84
Joined: 29 Feb 2016, 08:55

Re: To parse the value entered in the editbox.

19 Feb 2018, 01:22

Can we put a check here?

if the Inpt box ( vInpt) is empty, exit sub.
BoBo
Posts: 2515
Joined: 13 May 2014, 17:15

Re: To parse the value entered in the editbox.

19 Feb 2018, 09:51

Yes "we" can.

Code: [Select all] [Download] GeSHi © Codebox Plus

But:
Gui, Submit, NoHide
If (inpt != " ") { ; if input is NOT empty go on. Else ...
Arr := StrSplit(Inpt, "*")
Loop, 3
GuiControl,,Edi%A_index%, % Arr[a_index]
}
Return
chngrcn
Posts: 84
Joined: 29 Feb 2016, 08:55

Re: To parse the value entered in the editbox.

20 Feb 2018, 04:30

:) thank you very much bobo.. i can speak english a little. Excuse me!
Johana
Posts: 184
Joined: 02 May 2017, 02:34

Re: To parse the value entered in the editbox.

20 Feb 2018, 06:55

BoBo wrote:Yes "we" can.

Code: [Select all] [Download] GeSHi © Codebox Plus

But:
Gui, Submit, NoHide
If (inpt != " ") { ; if input is NOT empty go on. Else ...
Arr := StrSplit(Inpt, "*")
Loop, 3
GuiControl,,Edi%A_index%, % Arr[a_index]
}
Return


Bobo, is there a difference if there's a space where the " " are? I.e: Does this work:

BoBo
Posts: 2515
Joined: 13 May 2014, 17:15

Re: To parse the value entered in the editbox.

20 Feb 2018, 07:35

Well, there is a difference indeed ...

Code: [Select all] [Download] GeSHi © Codebox Plus

; inpt :=
; inpt := ""
inpt := " "

If (inpt != " ") ; if var doesn't contain a space character
MsgBox % "1 |" . inpt . "|"
If (inpt != "") ; if var isn't empty
MsgBox % "2 |" . inpt . "|"
Johana
Posts: 184
Joined: 02 May 2017, 02:34

Re: To parse the value entered in the editbox.

20 Feb 2018, 07:37

BoBo wrote:Well, there is a difference indeed ...

Code: [Select all] [Download] GeSHi © Codebox Plus

; inpt :=
; inpt := ""
inpt := " "

If (inpt != " ") ; if var doesn't contain a space character
MsgBox % "1 |" . inpt . "|"
If (inpt != "") ; if var isn't empty
MsgBox % "2 |" . inpt . "|"


Thanks!
chngrcn
Posts: 84
Joined: 29 Feb 2016, 08:55

Re: To parse the value entered in the editbox.

21 Feb 2018, 01:10

Odlanir wrote:

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus




I would like to ask my friends something else.
in the above code, but not in the editbox's change event?

Return to “Ask For Help”

Who is online

Users browsing this forum: No registered users and 20 guests