Check VARs from template files (READLINE txt >>> EVAL etc)

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
mustang
Posts: 11
Joined: 25 Apr 2017, 03:12

Check VARs from template files (READLINE txt >>> EVAL etc)

29 Jan 2018, 05:47

Sorry for my bad english.
Help implement the AHK algorithm for reading strings in TXT files and executing code.

I have files:

FILE .ini - BASE DATA

Code: Select all

[id_555]
game=USA
time_game=5
score_team1=2
score_team2=10
[id_999]
game=BRAZIL
time_game=60
score_team1=0
score_team2=0
FILE - 1...N -- TXT files (or OTHER?) - TEMPLATE for CHECK INI key

Code: Select all

template file 1
_______________________________
time_game <33 ? ok:=1 : ok:=0 
ok=1 AND game=USA ? result:=1 : 0

template file 2
_____________________________________________________
score_team2 > score_team1 AND game=BRAZIL ? result:=1 : 0

FILE - .ahk - for READ .ini AND .txt template

Code: Select all

IniRead, %key%, file.ini, %id%, %key%, %A_Space%

Loop, Read, ALL_files.txt
EVAL(A_LoopReadLine)

if result=1
	Msgbox, OK
mustang
Posts: 11
Joined: 25 Apr 2017, 03:12

Re: Check VARs from template files (READLINE txt >>> EVAL etc)

01 Feb 2018, 03:21

help help
or so it does not work out?
I do not want to create many ahk files for checking other keys.
User avatar
Capn Odin
Posts: 1352
Joined: 23 Feb 2016, 19:45
Location: Denmark
Contact:

Re: Check VARs from template files (READLINE txt >>> EVAL etc)

01 Feb 2018, 04:35

I think the reason you have not been helped is that it is unclear what your goal is.
For instance why would you rather have the code in a template instead of in a script ?
And to me this looks like a situation where I would use a loop to get all games and then do some calculations on them.
Please excuse my spelling I am dyslexic.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Bing [Bot], scriptor2016, Xtra and 140 guests