Why are these simple codes not working? Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
Sabestian Caine
Posts: 528
Joined: 12 Apr 2015, 03:53

Why are these simple codes not working?

14 May 2021, 13:09

Code: Select all

FileRead, data_base, C:\Users\ADMIN\Desktop\data file.txt
for key, value in a:=StrSplit(data_base, "`n")
	if (value = 4000)
		MsgBox % value
data file.txt has these values-
14_05_21 @11_36_09.PNG
14_05_21 @11_36_09.PNG (19.28 KiB) Viewed 414 times
you can find data file.txt here-
data file.txt
(62 Bytes) Downloaded 20 times
it should show 4000 in msgbox as there is value 4000 in the data file.txt, but when i run these codes it shows nothing. Please tell me why it is happening? what could be the possible reason for this? Please help...
I don't normally code as I don't code normally.
User avatar
SKAN
Posts: 1551
Joined: 29 Sep 2013, 16:58

Re: Why are these simple codes not working? Please help!!!  Topic is solved

14 May 2021, 13:17

Code: Select all

for key, value in a:=StrSplit(data_base, "`r`n")
StrSplit() delimiter should be CRLF instead of LF.
User avatar
Sabestian Caine
Posts: 528
Joined: 12 Apr 2015, 03:53

Re: Why are these simple codes not working? Please help!!!

15 May 2021, 12:33

SKAN wrote:
14 May 2021, 13:17

Code: Select all

for key, value in a:=StrSplit(data_base, "`r`n")
StrSplit() delimiter should be CRLF instead of LF.
Thanks dear SKAN... :bravo:
I don't normally code as I don't code normally.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: aitaixy, Anput, dangoscrub, doodles333, joedf, Nerafius and 103 guests