Hi.
Hoping for a bit of help and maybe an example.
I am trying to search through a text file which in theory could have a lot of entries.
Example
each line contains a files name
and a coresponding number
What I would like to do is search the text file with only knowing the file name and display it's corresponding number. This number is a constant 40 characters long and will always appear at the begging with an * as a separator.
I have looked a quite a few of the forum threads regarding STRIN FIND and the like but I have got nowhere.
I have this script, found the bases of it in an example I already have
All I get is a number ?
I need help..
Please help.
Hoping for a bit of help and maybe an example.
I am trying to search through a text file which in theory could have a lot of entries.
Example
4c463bc17cc1aa309122bec4f281cee458177063 *[el-gr]_el_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x86_dvd_5326726f.svf
69007067a599a0959a117a8d8dd8d3917cddc2ea *[en-gb]_en-gb_windows_10_consumer_editions_version_20h2_updat ed_jan_2021_x64_dvd_ba0f0c5d.svf
8f2ea3525c337cd487687025f7c6b91dc420076c *[en-gb]_en-gb_windows_10_consumer_editions_version_20h2_updat ed_jan_2021_x86_dvd_d9c25eff.svf
0429d19107c9c9dde9d6b1bec951652d52da5065 *[es-es]_es_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x64_dvd_1313f1b5.svf
6ee4706d01c346b66672aefc7861118f9a2f5e7e *[es-es]_es_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x86_dvd_b157e510.svf
a26ec8afbe8147e8b57b2e98c47fe5bb13c2439f *[es-mx]_es-mx_windows_10_consumer_editions_version_20h2_updat ed_jan_2021_x64_dvd_8b5351e1.svf
2c09252be9b44a54e9638f1f248614d07cf59154 *[es-mx]_es-mx_windows_10_consumer_editions_version_20h2_updat ed_jan_2021_x86_dvd_cca0add1.svf
0e9c22c52c81a4e65f4791858ddae349b307f99a *[et-ee]_et_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x64_dvd_8453f2a9.svf
69007067a599a0959a117a8d8dd8d3917cddc2ea *[en-gb]_en-gb_windows_10_consumer_editions_version_20h2_updat ed_jan_2021_x64_dvd_ba0f0c5d.svf
8f2ea3525c337cd487687025f7c6b91dc420076c *[en-gb]_en-gb_windows_10_consumer_editions_version_20h2_updat ed_jan_2021_x86_dvd_d9c25eff.svf
0429d19107c9c9dde9d6b1bec951652d52da5065 *[es-es]_es_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x64_dvd_1313f1b5.svf
6ee4706d01c346b66672aefc7861118f9a2f5e7e *[es-es]_es_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x86_dvd_b157e510.svf
a26ec8afbe8147e8b57b2e98c47fe5bb13c2439f *[es-mx]_es-mx_windows_10_consumer_editions_version_20h2_updat ed_jan_2021_x64_dvd_8b5351e1.svf
2c09252be9b44a54e9638f1f248614d07cf59154 *[es-mx]_es-mx_windows_10_consumer_editions_version_20h2_updat ed_jan_2021_x86_dvd_cca0add1.svf
0e9c22c52c81a4e65f4791858ddae349b307f99a *[et-ee]_et_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x64_dvd_8453f2a9.svf
[en-gb]_en-gb_windows_10_consumer_editions_version_20h2_updat ed_jan_2021_x64_dvd_ba0f0c5d.svf
69007067a599a0959a117a8d8dd8d3917cddc2ea
I have looked a quite a few of the forum threads regarding STRIN FIND and the like but I have got nowhere.
I have this script, found the bases of it in an example I already have
Code:
image = "[en-gb]_en-gb_windows_10_consumer_editions_version_20h2_updat ed_jan_2021_x64_dvd_ba0f0c5d.svf" --all_lines = TextFile.ReadToTable("AutoPlay\\Docs\\DataBase.txt "); local my_string = TextFile.ReadToString("AutoPlay\\Docs\\DataBase.tx t"); local all_lines = {}; for line in my_string:gmatch("[^\r\n]+") do all_lines[#all_lines + 1] = line; -- Dialog.Message("testing", line); -- result = ListBox.AddItem("ListBox1", line, ""); imagefound = String.Find(my_string, image, 1, false); Paragraph.SetText("Paragraph1", imagefound); end
I need help..
Please help.
Comment