Announcement

Collapse
No announcement yet.

Search a text file - display part of it

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Search a text file - display part of it

    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
    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
    each line contains a files name
    [en-gb]_en-gb_windows_10_consumer_editions_version_20h2_updat ed_jan_2021_x64_dvd_ba0f0c5d.svf
    and a coresponding number
    69007067a599a0959a117a8d8dd8d3917cddc2ea
    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

    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
    All I get is a number ?

    I need help..

    Please help.


  • #2
    Been looking at this just now and I think I have got part of the script.

    If I isolate the the complete string I need
    69007067a599a0959a117a8d8dd8d3917cddc2ea *[en-gb]_en-gb_windows_10_consumer_editions_version_20h2_updat ed_jan_2021_x64_dvd_ba0f0c5d.svf
    add this into a paragraph, then using this script
    Code:
    image = Paragraph.GetText("PG_image");
    hash = String.Left(image, 40);
    Input.SetText("known", hash);
    i get the result I am looking for,
    result =
    69007067a599a0959a117a8d8dd8d3917cddc2ea
    Just have to figure out how to grab the entire string when all is know is the second half.

    any tips would be appreciated

    Comment


    • #3
      PG_image = 69007067a599a0959a117a8d8dd8d3917cddc2ea *[en-gb]_en-gb_windows_10_consumer_editions_version_20h2_updat ed_jan_2021_x64_dvd_ba0f0c5d.svf

      _target = String.Find(PG_image, "*", 1, false);
      _pg2 = String.Mid(PG_image, _target+1, -1);
      _pg1 = String.Left(PG_image, _target-1);


      Input.SetText("known", _pg1);
      Input.SetText("known1", _pg2);

      Comment


      • #4
        Hi Old Fellow ,
        If you use string left and right and use you * as the delimiter it shoud work.Fiddled with gmatch in pure lua but I am not good at it.
        Try this
        oldfellow_help.apz
        Cheers

        Comment


        • #5
          Thanks guys..

          THANKS VERY MUCH !!!

          I would never have figured that out by myself.

          My little project will move along nicely now.

          Thanks again.

          keep an eye out, one my project is finished there is one thing I'd like to add, a progress bar.



          Comment


          • #6
            I have been looking at testing your scripts. They work, buttttttttt.

            The thing is I only know one part of the string.
            When an image is selected we do not know what the "hash" is we only know the image name.

            image name = [en-gb]_en-gb_windows_10_consumer_editions_version_20h2_updat ed_jan_2021_x64_dvd_ba0f0c5d.svf

            when my app does its thing it calculates the "hash" = 69007067a599a0959a117a8d8dd8d3917cddc2ea

            the data base document holds the info of many images, their file name and hash, or should i say the hash and the file name

            data base = 69007067a599a0959a117a8d8dd8d3917cddc2ea *[en-gb]_en-gb_windows_10_consumer_editions_version_20h2_updat ed_jan_2021_x64_dvd_ba0f0c5d.svf

            What I am trying to do is to display the "hash" with only knowing the image name.

            The aim is to compare the know hash against the c

            Comment


            • #7
              I have been looking at testing your scripts. They work, buttttttttt.

              The thing is I only know one part of the string.
              When an image is selected we do not know what the "hash" is we only know the image name.

              image name = [en-gb]_en-gb_windows_10_consumer_editions_version_20h2_updat ed_jan_2021_x64_dvd_ba0f0c5d.svf

              when my app does its thing it calculates the "hash" = 69007067a599a0959a117a8d8dd8d3917cddc2ea

              the data base document holds the info of many images, their file name and hash, or should i say the hash and the file name

              data base = 69007067a599a0959a117a8d8dd8d3917cddc2ea *[en-gb]_en-gb_windows_10_consumer_editions_version_20h2_updat ed_jan_2021_x64_dvd_ba0f0c5d.svf

              What I am trying to do is to display the "hash" with only knowing the image name.

              The aim is to compare the know hash against the calculated hash to see if there is a match or not.

              I have made my project so far as I have to manually input the know hash to compare. This is no big deal but i thought it would be cool to have the project check the data base automatically
              to get the image name find its known hash and display it.

              I must sound ungrateful but I do not mean to.
              both of the scripts given are working off that we know the whole string.

              Cheers..

              Something went wrong and it didn't post all I wrote. So posted twice

              Comment


              • #8
                Originally posted by colc View Post
                Hi Old Fellow ,
                If you use string left and right and use you * as the delimiter it shoud work.Fiddled with gmatch in pure lua but I am not good at it.
                Try this
                [ATTACH]n306171[/ATTACH]
                Cheers
                Can we chat about this.

                It does indeed split the strings up, puts the hash in one list box and the image name in another.
                BUT...
                The image name is altered
                from
                [en-gb]_en-gb_windows_10_consumer_editions_version_20h2_updat ed_jan_2021_x64_dvd_ba0f0c5d.svf

                to
                0h2_upda ted_jan_2021_x64_dvd_8453f2a9.svf

                I was thinking about this. If the image name could be displayed in full I have an idea.

                Could one list box be used to determine the hash from only knowing the image name.

                If the image name could be added to the list box as "text" and the hash be added as "data"

                could we then search the list box for the image name we know ( say the image lives in the inbox at position 10 ) it would fine the image name would it know what the corresponding data be for position 10 and display this data ( the hash) say in an input.

                is that possible ?

                But the image name would have to be intact.

                thoughts on this ?

                Comment


                • #9
                  OK reworked string codes and added P2
                  oldfellow_help_update.apz
                  Cheers

                  Comment


                  • #10
                    very convoluted.
                    for curiosity
                    - hash that you indicate was obtained from the file ... #Consumer Folder /// xxx.svf?
                    - are located within AMS?


                    Comment


                    • #11
                      Originally posted by colc View Post
                      OK reworked string codes and added P2
                      [ATTACH]n306179[/ATTACH]
                      Cheers
                      Thanks for that. Will look at it very soon.

                      Comment


                      • #12
                        Originally posted by herrin View Post
                        very convoluted.
                        for curiosity[HTML][/HTML]
                        - hash that you indicate was obtained from the file ... #Consumer Folder /// xxx.svf?
                        - are located within AMS?

                        The "database" document where the hash and file name info come from the source of the actual images.

                        Here is how the full doc looks like.

                        385bd92ce625511dfebd7ade8082ac864a081e32 *[ar-sa]_ar_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x64_dvd_d9089713.svf
                        872f214d175eed3c1f72fee1f5a1f96f8d368ba5 *[ar-sa]_ar_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x86_dvd_6568886c.svf
                        587f9974dfa226c75262275cdc4b78445e042582 *[bg-bg]_bg_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x64_dvd_50446f05.svf
                        e81d255f72ef6a5c13d922c30ee6c71338798cc6 *[bg-bg]_bg_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x86_dvd_7745f45e.svf
                        17200609fbe88d1ff2614d06486dccc10f3008bd *[cs-cz]_cs_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x64_dvd_62ff48f1.svf
                        c0594f0d248f636a3b7a058cbe1a587ac08c049e *[cs-cz]_cs_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x86_dvd_fa2870e5.svf
                        fc5463fe789f31a30af2ed552cadd0b5bb4c24f2 *[da-dk]_da_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x64_dvd_333e86d5.svf
                        6df147c79fb4e171639fc6bbed9d015cc7b51307 *[da-dk]_da_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x86_dvd_26be7f73.svf
                        8c2183aaecc7ba67cc36e29902dad8c1d73c1070 *[de-de]_de_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x64_dvd_0d45f04d.svf
                        a1cd89222fbf55169866b2b14ba75d60d97812d9 *[de-de]_de_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x86_dvd_9c8d4f55.svf
                        bea47b7f8626c74e50d479450f3fa294c3ea64ab *[el-gr]_el_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x64_dvd_1c8eac80.svf
                        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
                        1bdf0a380e7febd70ec34925b51171fad269aaf7 *[et-ee]_et_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x86_dvd_d0d12898.svf
                        c108ef3fd3ddcdded5990274a3afc8e5249b1e94 *[fi-fi]_fi_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x64_dvd_9bf1248d.svf
                        b49c1fee53b2e2a5fcd2bd10ba9deb1136fbadc3 *[fi-fi]_fi_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x86_dvd_caef09aa.svf
                        b7f47e152d317d2221d55d91e8277318b1e2cbc1 *[fr-ca]_fr-ca_windows_10_consumer_editions_version_20h2_updat ed_jan_2021_x64_dvd_3fffb758.svf
                        8bc3fb6f3b554356b31d2ca91e422b2075537670 *[fr-ca]_fr-ca_windows_10_consumer_editions_version_20h2_updat ed_jan_2021_x86_dvd_5d0de8e5.svf
                        ccbf9d038633905a88b761ecc09769d89cb81dcf *[fr-fr]_fr_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x64_dvd_1ef40ee8.svf
                        439bc0bbb8b5948be618cb0d2d0ad610821351e0 *[fr-fr]_fr_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x86_dvd_4ef3daa7.svf
                        0dd26b949bc02aaf19ac29b5fd190ccb4dd8ef88 *[he-il]_he_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x64_dvd_74b8d50e.svf
                        355657c530995d080739d57c9327915203c3c616 *[he-il]_he_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x86_dvd_41bb74a0.svf
                        dd0a0d3091080397af7344558a09ce7ccbf1c471 *[hr-hr]_hr_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x64_dvd_546b3f5c.svf
                        2bb143591baff93699aecc0b1511710617fd6d34 *[hr-hr]_hr_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x86_dvd_43926ef4.svf
                        13d88f557fa0e08b79a0c064a966330e9362c2ef *[hu-hu]_hu_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x64_dvd_183c17ad.svf
                        e337692c0a9634c612439264a96628f10bfd3238 *[hu-hu]_hu_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x86_dvd_50ca35ec.svf
                        e7886fe18eece0d4cccab6e664218d6a318cc932 *[it-it]_it_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x64_dvd_24d14a80.svf
                        db33ba84371692dceb6e4db0fe5e66586a48f42a *[it-it]_it_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x86_dvd_ed35c806.svf
                        ca9c51c91d39cc1fde9695825e7c752fe45893a2 *[ja-jp]_ja_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x64_dvd_c54d0fce.svf
                        32247534bbebfdd8890df5c57ef36f55281d2fb7 *[ja-jp]_ja_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x86_dvd_58082683.svf
                        2d3f7426eda619cc69338efbeada0c9ed02c12a4 *[ko-kr]_ko_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x64_dvd_2cba874f.svf
                        d1ad0721ffc024b928fd1f28b4a81c0ddaf9b18e *[ko-kr]_ko_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x86_dvd_4954e30a.svf
                        51408dc8d208fbd87cf68aec6a811a091dd515b5 *[lt-lt]_lt_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x64_dvd_574b4f98.svf
                        e30b94bc108c38434b99e8a8cea70499004cff7d *[lt-lt]_lt_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x86_dvd_f9fd6c76.svf
                        b135c0814e79e96336a721622993efedfe75bc51 *[lv-lv]_lv_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x64_dvd_b4361600.svf
                        97680976ba29eec5dd85f759793f3042c81de185 *[lv-lv]_lv_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x86_dvd_46d098c0.svf
                        d109ac47094ea4230b77b3360255c3b9affeccad *[nb-no]_nb_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x64_dvd_8909d7e6.svf
                        c2f40c20e0e7e65b21924c2242b099f13eaaa539 *[nb-no]_nb_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x86_dvd_12794d2f.svf
                        e45ef440c943fa7134e7425933401df6f7858b37 *[nl-nl]_nl_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x64_dvd_d10464ab.svf
                        e71c8e26cfad5e596556680108b637194cbad9fc *[nl-nl]_nl_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x86_dvd_adc23ea4.svf
                        56672c20c77e4e959f90f08a8f0beea2302297e7 *[pl-pl]_pl_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x64_dvd_9d4a3425.svf
                        b9b6c63ae1edb0e04fda8d21600641c516840805 *[pl-pl]_pl_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x86_dvd_32ab9391.svf
                        cad4da07085868efb4ed82986583363b960145ba *[pt-br]_pt_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x64_dvd_149fbb4e.svf
                        4dc0039dbb77d00e4c8298d40251e22a6d6778ac *[pt-br]_pt_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x86_dvd_42fe1337.svf
                        a4b2d2d7c1ad6aabb24f8493adc7f4c322917b2f *[pt-pt]_pp_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x64_dvd_e21b0aa6.svf
                        b74d614ed331f96bf2dc597db873fe554d773428 *[pt-pt]_pp_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x86_dvd_dc68948b.svf
                        747517759e391ff3e455892dcd7db9a21979b54c *[ro-ro]_ro_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x64_dvd_3510364b.svf
                        cc317fac7bf0d0911cb42a629d757c4dee87df83 *[ro-ro]_ro_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x86_dvd_bef605ab.svf
                        f9d8000cec882c0ac1b04526859f6481def6dd74 *[ru-ru]_ru_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x64_dvd_4ce1a3ca.svf
                        fc5bc6f154a84aad2125f52905837562b197db86 *[ru-ru]_ru_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x86_dvd_4a430a85.svf
                        644748dd5cbc131a9478c6298e01239b33c3753f *[sk-sk]_sk_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x64_dvd_3db68a78.svf
                        f4022***93711ef710ba119365bb2aa3fdec1b03 *[sk-sk]_sk_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x86_dvd_fd16f49f.svf
                        e033cbc8ff82bdd5b5bfee56a5022fe0664acf7d *[sl-si]_sl_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x64_dvd_de7afb13.svf
                        2967eaeb7967a2b75d9de20ad7f33fa8b0412645 *[sl-si]_sl_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x86_dvd_b118c9dc.svf
                        6fc7c0b17ef4401dcdea08ef4618270d87db234b *[sr-rs]_sr_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x64_dvd_49b6139b.svf
                        13827ff651dafaa887f77850856f25afaf831a23 *[sr-rs]_sr_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x86_dvd_2b84890a.svf
                        dd7292e6068a56ffdb6907cbdd4597164f0c7f55 *[sv-se]_sv_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x64_dvd_e82142e9.svf
                        2428485123a09fe8208b1c27b76e17d46d2befc3 *[sv-se]_sv_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x86_dvd_3a16c16a.svf
                        b9d627a1b1cfa87f9d2fa71d126913835c28b808 *[th-th]_th_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x64_dvd_6d730dbb.svf
                        fc80d8bfff955ba801c180b8ca3fa0c32fcd1fb0 *[th-th]_th_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x86_dvd_8e4cf29f.svf
                        2e96be92a7bd2990c9aa930853ac47f14fb1fa44 *[tr-tr]_tr_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x64_dvd_ba0caaa7.svf
                        4562ede78e7c1a7e33179f7305c8e1c4101233b1 *[tr-tr]_tr_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x86_dvd_5ec1b8d2.svf
                        df598d6e12a0fb65becf2504c2d07d7271db407b *[uk-ua]_uk_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x64_dvd_de30cd6f.svf
                        fe95750fa359c9f4d4e2453aaa580387daf71555 *[uk-ua]_uk_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x86_dvd_81e7d320.svf
                        fb82617276e54df02824f721d7ad163d0ae97a47 *[zh-cn]_cn_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x64_dvd_0af89254.svf
                        d5fbbcd989c3af1e09545687d0da950e627fc3c8 *[zh-cn]_cn_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x86_dvd_bd5d62ca.svf
                        039d08c01f52f0990368a19f8db67ff089568768 *[zh-tw]_ct_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x64_dvd_55f85e56.svf
                        3527e630a4d7cd4909403e424cde0f40e3278412 *[zh-tw]_ct_windows_10_consumer_editions_version_20h2_upda ted_jan_2021_x86_dvd_454f7451.svf
                        6db46154b3e9ba42c1118e2ef5ec82ebd4582215 *[ar-sa]_ar_windows_10_business_editions_version_20h2_upda ted_jan_2021_x64_dvd_b9ebda86.svf
                        4893b87e800a273b4e90248c390c19c240ca1d25 *[ar-sa]_ar_windows_10_business_editions_version_20h2_upda ted_jan_2021_x86_dvd_615df049.svf
                        52fab6f3459e7e1036cbd754d0b5f2f7cc0fd6fe *[bg-bg]_bg_windows_10_business_editions_version_20h2_upda ted_jan_2021_x64_dvd_588fda98.svf
                        34a80117e7199cd91350d30b3d7b7afad2ca3694 *[bg-bg]_bg_windows_10_business_editions_version_20h2_upda ted_jan_2021_x86_dvd_ced602d8.svf
                        6a0e09f067cbeb0315b7a86aacb2da626fd881cc *[cs-cz]_cs_windows_10_business_editions_version_20h2_upda ted_jan_2021_x64_dvd_22b781cb.svf
                        98725dbdde3bebc837565393fcdf7461539af505 *[cs-cz]_cs_windows_10_business_editions_version_20h2_upda ted_jan_2021_x86_dvd_e127ea17.svf
                        1c521325d969a740af664973beaec7d035af53ff *[da-dk]_da_windows_10_business_editions_version_20h2_upda ted_jan_2021_x64_dvd_9705bc64.svf
                        cf8f545abceb39417858969b73d0cbb54356c279 *[da-dk]_da_windows_10_business_editions_version_20h2_upda ted_jan_2021_x86_dvd_31c04fe3.svf
                        e6c9d756f391f38f8d93410747b90e1084f88fd5 *[de-de]_de_windows_10_business_editions_version_20h2_upda ted_jan_2021_x64_dvd_95515cd5.svf
                        947ede7414c4dbc44d72f07bf7cef1d62365a9ac *[de-de]_de_windows_10_business_editions_version_20h2_upda ted_jan_2021_x86_dvd_7fe85a3a.svf
                        cbd25303a3802697f095f169f854fd45fb859a20 *[el-gr]_el_windows_10_business_editions_version_20h2_upda ted_jan_2021_x64_dvd_5f1e3ba7.svf
                        5e6c6c027efd452de3a4161f8e61a5e95c62ad72 *[el-gr]_el_windows_10_business_editions_version_20h2_upda ted_jan_2021_x86_dvd_2c5d254e.svf
                        0529d5fedacc7895e6e7895ab503c54397bdd1b5 *[en-gb]_en-gb_windows_10_business_editions_version_20h2_updat ed_jan_2021_x64_dvd_bc6874d4.svf
                        652e6d69fa3645cf17cf1a89ac45a2fc01ae33f2 *[en-gb]_en-gb_windows_10_business_editions_version_20h2_updat ed_jan_2021_x86_dvd_ff890c18.svf
                        4dd2d3d868a353d6e104ff6f4d752353efed9e8c *[en-us]_en_windows_10_business_editions_version_20h2_upda ted_jan_2021_x64_dvd_533a330d.svf
                        ff917fbc1920a37d069d07ef02cf41791d541886 *[en-us]_en_windows_10_business_editions_version_20h2_upda ted_jan_2021_x86_dvd_52e612bc.svf
                        03bc8d60ee40e62d3c23f2b312cef76f58a84227 *[es-es]_es_windows_10_business_editions_version_20h2_upda ted_jan_2021_x64_dvd_69edcd91.svf
                        aa2012769e75ef95a32ae90fe0d98481ec83e139 *[es-es]_es_windows_10_business_editions_version_20h2_upda ted_jan_2021_x86_dvd_1f266d91.svf
                        f1eb2b3a9ed822f651ff3596340166f04a690638 *[es-mx]_es-mx_windows_10_business_editions_version_20h2_updat ed_jan_2021_x64_dvd_3a78a17d.svf
                        b4c0ceeb88117044686394889ad5463551f5d6a6 *[es-mx]_es-mx_windows_10_business_editions_version_20h2_updat ed_jan_2021_x86_dvd_e6d18e52.svf
                        ad931da8b390940bcd4b07413b708638fdb45704 *[et-ee]_et_windows_10_business_editions_version_20h2_upda ted_jan_2021_x64_dvd_e93084cd.svf
                        4ca99241503ab449847a33ca07ec6efe88fcdbb2 *[et-ee]_et_windows_10_business_editions_version_20h2_upda ted_jan_2021_x86_dvd_925dc80a.svf
                        055e3b687edfe3ea144a5c2c512d05c69579ab4e *[fi-fi]_fi_windows_10_business_editions_version_20h2_upda ted_jan_2021_x64_dvd_dedeaf53.svf
                        c29c6de64f33382b8427b6fbe4dfa16e3a20014f *[fi-fi]_fi_windows_10_business_editions_version_20h2_upda ted_jan_2021_x86_dvd_d464bee8.svf
                        ecb95f95ec9c2f25a5ebad17d4a300a77dbb445e *[fr-ca]_fr-ca_windows_10_business_editions_version_20h2_updat ed_jan_2021_x64_dvd_19eff0bc.svf
                        240878e0e1211efe9a8f8f258ceb85e3be24e5f6 *[fr-ca]_fr-ca_windows_10_business_editions_version_20h2_updat ed_jan_2021_x86_dvd_77204278.svf
                        4ebb220a45e83226b4c50e2ccade9bb9d6a7a226 *[fr-fr]_fr_windows_10_business_editions_version_20h2_upda ted_jan_2021_x64_dvd_0465cba4.svf
                        51a55a6084667d81192dbf877ddd1ce302547bb1 *[fr-fr]_fr_windows_10_business_editions_version_20h2_upda ted_jan_2021_x86_dvd_8a2defe7.svf
                        1bcb8d9ed823ebf46b75388b1d717a0c1851754c *[he-il]_he_windows_10_business_editions_version_20h2_upda ted_jan_2021_x64_dvd_59978f57.svf
                        414cc7148b6041a8769c8eea8e3acc080adb6a11 *[he-il]_he_windows_10_business_editions_version_20h2_upda ted_jan_2021_x86_dvd_5dcd4208.svf
                        c8430767ff001c34216092f87195f73a8b697d9a *[hr-hr]_hr_windows_10_business_editions_version_20h2_upda ted_jan_2021_x64_dvd_86c73c83.svf
                        62678d8dbd64206f6d0d67a9339d34435dd99a1b *[hr-hr]_hr_windows_10_business_editions_version_20h2_upda ted_jan_2021_x86_dvd_4e1623fe.svf
                        5dd5b91107218903ef400cd99994df136d475c10 *[hu-hu]_hu_windows_10_business_editions_version_20h2_upda ted_jan_2021_x64_dvd_996fb9e0.svf
                        c5f308d43bc3c40526746686d7b33f86f6897dbb *[hu-hu]_hu_windows_10_business_editions_version_20h2_upda ted_jan_2021_x86_dvd_11a6df12.svf
                        840ec604a30349ef4ecfed3e9a7137f0c4412d0c *[it-it]_it_windows_10_business_editions_version_20h2_upda ted_jan_2021_x64_dvd_657bd0c2.svf
                        3d428995cdd40d77fe0b106a8d88190cc69cf005 *[it-it]_it_windows_10_business_editions_version_20h2_upda ted_jan_2021_x86_dvd_adf35f93.svf
                        f668bc1cf2d97dd3ec5b3ab2654968697f291efc *[ja-jp]_ja_windows_10_business_editions_version_20h2_upda ted_jan_2021_x64_dvd_cb418578.svf
                        88183c91a5ac2edef8f807ac27bd7d19e3e84f24 *[ja-jp]_ja_windows_10_business_editions_version_20h2_upda ted_jan_2021_x86_dvd_7095bda2.svf
                        619469f3113854a965a129955c0a744f7d0761da *[ko-kr]_ko_windows_10_business_editions_version_20h2_upda ted_jan_2021_x64_dvd_a31f060c.svf
                        2ec5bc2d1dbe8b793b8077314b333d56a54f682d *[ko-kr]_ko_windows_10_business_editions_version_20h2_upda ted_jan_2021_x86_dvd_d75dde61.svf
                        b43f332552329ac7ca5097eb5898f26b55897743 *[lt-lt]_lt_windows_10_business_editions_version_20h2_upda ted_jan_2021_x64_dvd_1dd382ff.svf
                        8d3c4584a5ee97b677b656530533ef03a19de7ca *[lt-lt]_lt_windows_10_business_editions_version_20h2_upda ted_jan_2021_x86_dvd_63d48935.svf
                        6142347efb2f1325d837aba2427fa644f3d6a517 *[lv-lv]_lv_windows_10_business_editions_version_20h2_upda ted_jan_2021_x64_dvd_8208ed5e.svf
                        ee470697aa916a92e5864feb2145f93e8e34ac8b *[lv-lv]_lv_windows_10_business_editions_version_20h2_upda ted_jan_2021_x86_dvd_e15407da.svf
                        44440e44fc697876cdbbccc597f49ea82a139f7c *[nb-no]_nb_windows_10_business_editions_version_20h2_upda ted_jan_2021_x64_dvd_cd715d48.svf
                        3ded5368e532e20796a73b1d1508777871d4041c *[nb-no]_nb_windows_10_business_editions_version_20h2_upda ted_jan_2021_x86_dvd_652e5648.svf
                        f1d9a8c58e8453898a91ba271ee1b81b262c0b37 *[nl-nl]_nl_windows_10_business_editions_version_20h2_upda ted_jan_2021_x64_dvd_eee5f7fa.svf
                        bce3b23c53c9535b2322e96e487fbdb35faf2a35 *[nl-nl]_nl_windows_10_business_editions_version_20h2_upda ted_jan_2021_x86_dvd_b7c62997.svf
                        656c940926bb35cdb9ca2a8427a34988ed78a3b8 *[pl-pl]_pl_windows_10_business_editions_version_20h2_upda ted_jan_2021_x64_dvd_30619742.svf
                        1fb013e88e2c3845aa82901e64ee3f621ba6f934 *[pl-pl]_pl_windows_10_business_editions_version_20h2_upda ted_jan_2021_x86_dvd_514858d0.svf
                        ca6cfb9d9571c40b664c2de93b8ebe2ba1bbc7bf *[pt-br]_pt_windows_10_business_editions_version_20h2_upda ted_jan_2021_x64_dvd_6c2f09e2.svf
                        8c6b8e3bfc575c7fb4ab76578036582b6a5e7c42 *[pt-br]_pt_windows_10_business_editions_version_20h2_upda ted_jan_2021_x86_dvd_78afee0f.svf
                        5e1093f408fc7adb5e13bee80042173ab836e304 *[pt-pt]_pp_windows_10_business_editions_version_20h2_upda ted_jan_2021_x64_dvd_c8133c95.svf
                        0f831a69d4ca86262ab55bb8f3c5fe8a463a8efe *[pt-pt]_pp_windows_10_business_editions_version_20h2_upda ted_jan_2021_x86_dvd_ff6d4dd2.svf
                        668bc5bf0c721f275feb26cb3040b31eba00636c *[ro-ro]_ro_windows_10_business_editions_version_20h2_upda ted_jan_2021_x64_dvd_c089300e.svf
                        8e5bf989cda2a5f4fedfbd122a240c0ddb2f3a84 *[ro-ro]_ro_windows_10_business_editions_version_20h2_upda ted_jan_2021_x86_dvd_77cb1a14.svf
                        e0abc5c71ae2c747c8a5a14ce27f53508c915379 *[ru-ru]_ru_windows_10_business_editions_version_20h2_upda ted_jan_2021_x64_dvd_f09398b8.svf
                        c41351b7d1530c3fd2cd530155a4440ff89473fc *[ru-ru]_ru_windows_10_business_editions_version_20h2_upda ted_jan_2021_x86_dvd_ee452b0b.svf
                        a374bae303775121eb8a0116e16486908c48f60f *[sk-sk]_sk_windows_10_business_editions_version_20h2_upda ted_jan_2021_x64_dvd_74b698b5.svf
                        657157137cac751f22417297c3a6786e8c18942c *[sk-sk]_sk_windows_10_business_editions_version_20h2_upda ted_jan_2021_x86_dvd_992b8dd5.svf
                        3d525996c223ae6c2373ec7183ebd7fa2d4519aa *[sl-si]_sl_windows_10_business_editions_version_20h2_upda ted_jan_2021_x64_dvd_bb4ca2dc.svf
                        9559cb07e995514590f4a05f979ff9e4572da22a *[sl-si]_sl_windows_10_business_editions_version_20h2_upda ted_jan_2021_x86_dvd_817dcd9e.svf
                        b956252d531c0f0b5bf044006b06a8a93b1103b6 *[sr-rs]_sr_windows_10_business_editions_version_20h2_upda ted_jan_2021_x64_dvd_cbcfb7c0.svf
                        63acde115e06d3187365daa97fab7da9654ca303 *[sr-rs]_sr_windows_10_business_editions_version_20h2_upda ted_jan_2021_x86_dvd_a460e34d.svf
                        b855686ae6c6d595e2284d18f07ec01f32e65b41 *[sv-se]_sv_windows_10_business_editions_version_20h2_upda ted_jan_2021_x64_dvd_b4ab0545.svf
                        8a2be35231d895ee168dffc13f67d1f580d9f985 *[sv-se]_sv_windows_10_business_editions_version_20h2_upda ted_jan_2021_x86_dvd_0a54f5e3.svf
                        a5fd942390294add49548d04e393902748b15fdb *[th-th]_th_windows_10_business_editions_version_20h2_upda ted_jan_2021_x64_dvd_494440a7.svf
                        46b0e655029ad5094692d296db30cd96360f993a *[th-th]_th_windows_10_business_editions_version_20h2_upda ted_jan_2021_x86_dvd_4026e8d5.svf
                        3f72a6b19f0c4202638dacdb4eeaf10047cd0a2e *[tr-tr]_tr_windows_10_business_editions_version_20h2_upda ted_jan_2021_x64_dvd_85d1432a.svf
                        05864c85ed3051f9b901644b8577a884ab25cf0f *[tr-tr]_tr_windows_10_business_editions_version_20h2_upda ted_jan_2021_x86_dvd_a7603ed7.svf
                        f089067a71cc66265ab02a13ecca68d066a44cb8 *[uk-ua]_uk_windows_10_business_editions_version_20h2_upda ted_jan_2021_x64_dvd_c1aee642.svf
                        946090996582be5f7158fe722760ba22c10bee9c *[uk-ua]_uk_windows_10_business_editions_version_20h2_upda ted_jan_2021_x86_dvd_c2b3c254.svf
                        e40709a54223aedfacc22f3dac0dd57f5e79c9a3 *[zh-cn]_cn_windows_10_business_editions_version_20h2_upda ted_jan_2021_x64_dvd_b6eb1ee6.svf
                        f05a63f6f1320d0c97eacb5ec033556dcef34c29 *[zh-cn]_cn_windows_10_business_editions_version_20h2_upda ted_jan_2021_x86_dvd_6e0c098e.svf
                        ba1168a1064117e231c653440843d75541aa5606 *[zh-tw]_ct_windows_10_business_editions_version_20h2_upda ted_jan_2021_x64_dvd_8cb7d0d7.svf
                        b41c07c812b76c16ffaf8abd4c302a9281776d45 *[zh-tw]_ct_windows_10_business_editions_version_20h2_upda ted_jan_2021_x86_dvd_1d94f200.svf
                        My project lives, for now inside of C:\VeriHash
                        This is where the "database" text file lives.

                        There will be actually two text files very similar in nature, one for .svf and the other for .iso. Both relating to certain images.
                        The part of the string just before the * is the known hash of an image.
                        my project calculates the hash of an image and compares it to the known hash and verifies it.

                        I used to use a typical bit of software to do this but the .iso images started to use SHA256 hash instead of SHA1 and my chosen software was old and did not do this.
                        I made some simple .cmd files to calculate the hashes but then go the idea to make my own GUI.

                        Which I am currently doing.

                        Hope this helps understand.

                        Comment


                        • #13
                          Originally posted by colc View Post
                          OK reworked string codes and added P2
                          [ATTACH]n306179[/ATTACH]
                          Cheers
                          WOW.....

                          That looks brilliant.
                          You took my idea of using a list box adding the file to "text" and the hash to "data".

                          You managed to keep the file name intact. BRILLIANT.

                          I am pretty sure I can incorporate that into my project.

                          I can only say many thanks for taking the time to make those examples for me.

                          You never know somebody else down may get help looking at those .apz files in the future.

                          Thanks to you, colc and telco for helping out. Thanks also to herrin for the input.

                          Would never have figured it without help.



                          Comment


                          • #14
                            Well. Hit a little snag with List Box Find Item.

                            It would not find the whole image name,
                            [en-gb]_en-gb_windows_10_consumer_editions_version_20h2_updat ed_jan_2021_x64_dvd_ba0f0c5d.svf
                            took me a wee while to figure out it did not like the [en-gb] bit

                            it would find
                            en-gb_en-gb_windows_10_consumer_editions_version_20h2_updat ed_jan_2021_x64_dvd_ba0f0c5d.svf
                            mmmmmm I thought.
                            Looked at this part of the script
                            Code:
                            result2 = String.Mid(line, delimit+1,len);
                            and changed it to
                            Code:
                            result2 = String.Mid(line, delimit+9,len);
                            it then added all of the DataBase text file names as without the
                            [en-gb]_
                            then this script

                            Code:
                            LB_position = ListBox.FindItem("ListBox1", -1, LB_BYTEXT, "en-gb_windows_10_consumer_editions_version_20h2_updat ed_jan_2021_x64_dvd_ba0f0c5d.svf");
                            
                            Input.SetText("List Box Position", LB_position);
                            
                            LB_Text = ListBox.GetItemText("ListBox1", LB_position);
                            Input.SetText("List Box Text", LB_Text);
                            
                            LB_Data = ListBox.GetItemData("ListBox1", 1);
                            Input.SetText("List Box Data", LB_Data);
                            found my image and displayed the TEXT and DATA I wanted.

                            What I have to do now is when I enter the image in my project I have to remove the
                            [en-gb]_
                            before I ask to search in the list box.

                            Does that make sense ?

                            Comment


                            • #15
                              Just realised i had made a mistake.. List Box Search should be

                              Code:
                              LB_position = ListBox.FindItem("ListBox1", -1, LB_BYTEXT, "en-gb_windows_10_consumer_editions_version_20h2_updat ed_jan_2021_x64_dvd_ba0f0c5d.svf");
                              
                              Input.SetText("List Box Position", LB_position);
                              
                              LB_Text = ListBox.GetItemText("ListBox1", LB_position);
                              Input.SetText("List Box Text", LB_Text);
                              
                              LB_Data = ListBox.GetItemData("ListBox1", LB_position);
                              Input.SetText("List Box Data", LB_Data);

                              Comment

                              Working...
                              X