Jump to content

Step through and read json, use data and cherry pick wish order for output by reading from segments


 Share

Recommended Posts

Below is a sample output from my recently hdhomerun scan, I also attached it as a json file.

Once in a while channels change and a new scan has to be done, every time it messes up channels order and some if not most will no longer work and its very time consuming to go read the json manually and single handily do them all 1 by 1 and put them in cherry pick order again.

Obviously, I do not know a ton about this  And would like to do something like this.

Sample from device read, does also include full json file called target-hdhomerun.json from my last scan and a wishOrder.txt, both attached to this thread.

[
  {
    "GuideNumber": "1",
    "GuideName": "DR 1",
    "VideoCodec": "H264",
    "AudioCodec": "MPEG",
    "HD": 1,
    "URL": "http://192.168.1.5:5004/a/v1"
  },
  {
    "GuideNumber": "2",
    "GuideName": "TV 2 (Østjylla",
    "VideoCodec": "H264",
    "AudioCodec": "AC3",
    "HD": 1,
    "URL": "http://192.168.1.5:5004/a/v2"
  },
  {
    "GuideNumber": "3",
    "GuideName": "TV3",
    "VideoCodec": "H264",
    "AudioCodec": "AC3",
    "HD": 1,
    "URL": "http://192.168.1.5:5004/a/v3"
  },
  {
    "GuideNumber": "4",
    "GuideName": "TV3+",
    "VideoCodec": "H264",
    "AudioCodec": "AC3",
    "HD": 1,
    "URL": "http://192.168.1.5:5004/a/v4"
  },
  {
    "GuideNumber": "5",
    "GuideName": "Kanal 5",
    "VideoCodec": "H264",
    "AudioCodec": "MPEG",
    "HD": 1,
    "URL": "http://192.168.1.5:5004/a/v5"
  },
  {
    "GuideNumber": "6",
    "GuideName": "TV 2 Zulu",
    "VideoCodec": "H264",
    "AudioCodec": "AC3",
    "HD": 1,
    "URL": "http://192.168.1.5:5004/a/v6"
  },
  {
    "GuideNumber": "7",
    "GuideName": "TV 2 Charlie",
    "VideoCodec": "H264",
    "AudioCodec": "AC3",
    "HD": 1,
    "URL": "http://192.168.1.5:5004/a/v7"
  },
  {
    "GuideNumber": "8",
    "GuideName": "TV 2 NEWS",
    "VideoCodec": "H264",
    "AudioCodec": "AC3",
    "HD": 1,
    "URL": "http://192.168.1.5:5004/a/v8"
  },
  {
    "GuideNumber": "9",
    "GuideName": "TV3 Puls",
    "VideoCodec": "H264",
    "AudioCodec": "MPEG",
    "HD": 1,
    "URL": "http://192.168.1.5:5004/a/v9"
  },
  {
    "GuideNumber": "10",
    "GuideName": "Kanal 4",
    "VideoCodec": "H264",
    "AudioCodec": "MPEG",
    "HD": 1,
    "URL": "http://192.168.1.5:5004/a/v10"
  }
]


Here I would like to read the json from the target ip in this case http://192.168.1.5:5004 save it to a file

Use the information

Next manually go through the list as a first timer and make my wish order for each segment with GuideNumber order and at the same time pick the GuideName and URL for each sort

 

Let's say my order for the first 10 in sample would be

1
2
6
7
8
3
4
9
10
5

 

Outcome would become this

 

GuideNumber GuideName
URL

1 DR1
http://192.168.1.5:5004/a/v1


2 TV 2 (Østjylla
http://192.168.1.5:5004/a/v2


6 TV 2 Zulu
http://192.168.1.5:5004/a/v6


7 TV 2 Charlie
http://192.168.1.5:5004/a/v7


8 TV 2 NEWS
http://192.168.1.5:5004/a/v8


3 TV3
http://192.168.1.5:5004/a/v3


4 TV3+
http://192.168.1.5:5004/a/v4


9 TV3 Puls
http://192.168.1.5:5004/a/v9

10 Kanal 4
http://192.168.1.5:5004/a/v10

5 Kanal 5
http://192.168.1.5:5004/a/v5


I would also like it to say if any outside from the wish order was not included, could be various reason if I forgot/missed to add at first timer or new channel was recently found that was not included in wish order.

 

Thanks for reading so far..

Stay safe people!

target-hdhomerun.json wishOrder.txt

target-sample-hdhomerun.json

lineup-original.json

Edited by wazer
forgot to upload sample json
Link to comment
Share on other sites

Your wishOrder.txt is incomplete, only 10 elements are listed.

What have you tried so far that is not working ?

To get you started, here the SRE to extract the desired elements into a 1d array :

Local $aArray = StringRegExp($sText, '(?s)"(?|GuideNumber|GuideName|URL)": "([^"]*)', 3)

What I suggest you do next :

1- convert the 1d into a 2d array

2- Read the wish list into a 1d array

3- Add a 4th column in the 2d array

4- Loop thru the wish list and search the 2d array for the same entry (_ArraySearch), adding a 1 in the 4th column to indicate you found it.  Print result.

5- _ArrayFindAll on the 4th column to find the missing entries

Voilà !

Link to comment
Share on other sites

4 hours ago, Nine said:

Your wishOrder.txt is incomplete, only 10 elements are listed.

What have you tried so far that is not working ?

To get you started, here the SRE to extract the desired elements into a 1d array :

Local $aArray = StringRegExp($sText, '(?s)"(?|GuideNumber|GuideName|URL)": "([^"]*)', 3)

What I suggest you do next :

1- convert the 1d into a 2d array

2- Read the wish list into a 1d array

3- Add a 4th column in the 2d array

4- Loop thru the wish list and search the 2d array for the same entry (_ArraySearch), adding a 1 in the 4th column to indicate you found it.  Print result.

5- _ArrayFindAll on the 4th column to find the missing entries

Voilà !

Sorry forgot to add the sample with 10 in target-sample-hdhomerun.json and also uploaded the original unedited json from the hdhomerun.

So far I got this.

;https://www.autoitscript.com/forum/topic/148114-a-non-strict-json-udf-jsmn/
#include <JSON.au3>
#include <Array.au3>
$oHttp = ObjCreate("winHttp.winHttpRequest.5.1")
$apiURL = "http://192.168.1.5/lineup.json"
$oHttp.open("GET", $APIURL)
$oHttp.send()
$result = $oHttp.ResponseText
ConsoleWrite($result)

Which give result
 

[{"GuideNumber":"1","GuideName":"DR 1","OriginalNetworkID":100,"TransportStreamID":4,"Modulation":"a8qam256-6875","Frequency":266000000,"ProgramNumber":12050,"VideoCodec":"H264","AudioCodec":"MPEG","HD":1,"URL":"http://192.168.1.5:5004/a/v1"},{"GuideNumber":"2","GuideName":"TV 2 (Østjylla","OriginalNetworkID":100,"TransportStreamID":5,"Modulation":"a8qam256-6875","Frequency":274000000,"ProgramNumber":200,"VideoCodec":"H264","AudioCodec":"AC3","HD":1,"URL":"http://192.168.1.5:5004/a/v2"},{"GuideNumber":"3","GuideName":"TV3","OriginalNetworkID":100,"TransportStreamID":17,"Modulation":"a8qam256-6875","Frequency":306000000,"ProgramNumber":2650,"VideoCodec":"H264","AudioCodec":"AC3","HD":1,"URL":"http://192.168.1.5:5004/a/v3"},{"GuideNumber":"4","GuideName":"TV3+","OriginalNetworkID":100,"TransportStreamID":11,"Modulation":"a8qam256-6875","Frequency":570000000,"ProgramNumber":10342,"VideoCodec":"H264","AudioCodec":"AC3","HD":1,"URL":"http://192.168.1.5:5004/a/v4"},{"GuideNumber":"5","GuideName":"Kanal 5","OriginalNetworkID":100,"TransportStreamID":17,"Modulation":"a8qam256-6875","Frequency":306000000,"ProgramNumber":10343,"VideoCodec":"H264","AudioCodec":"MPEG","HD":1,"URL":"http://192.168.1.5:5004/a/v5"},{"GuideNumber":"6","GuideName":"TV 2 Zulu","OriginalNetworkID":100,"TransportStreamID":26,"Modulation":"a8qam256-6875","Frequency":658000000,"ProgramNumber":13942,"VideoCodec":"H264","AudioCodec":"AC3","HD":1,"URL":"http://192.168.1.5:5004/a/v6"},{"GuideNumber":"7","GuideName":"TV 2 Charlie","OriginalNetworkID":100,"TransportStreamID":7,"Modulation":"a8qam256-6875","Frequency":290000000,"ProgramNumber":15213,"VideoCodec":"H264","AudioCodec":"AC3","HD":1,"URL":"http://192.168.1.5:5004/a/v7"},{"GuideNumber":"8","GuideName":"TV 2 NEWS","OriginalNetworkID":100,"TransportStreamID":9,"Modulation":"a8qam256-6875","Frequency":554000000,"ProgramNumber":133,"VideoCodec":"H264","AudioCodec":"AC3","HD":1,"URL":"http://192.168.1.5:5004/a/v8"},{"GuideNumber":"9","GuideName":"TV3 Puls","OriginalNetworkID":100,"TransportStreamID":3,"Modulation":"a8qam256-6875","Frequency":258000000,"ProgramNumber":10093,"VideoCodec":"H264","AudioCodec":"MPEG","HD":1,"URL":"http://192.168.1.5:5004/a/v9"},{"GuideNumber":"10","GuideName":"Kanal 4","OriginalNetworkID":100,"TransportStreamID":6,"Modulation":"a8qam256-6875","Frequency":282000000,"ProgramNumber":15207,"VideoCodec":"H264","AudioCodec":"MPEG","HD":1,"URL":"http://192.168.1.5:5004/a/v10"},{"GuideNumber":"11","GuideName":"TV 2 (Syd)","OriginalNetworkID":100,"TransportStreamID":6,"Modulation":"a8qam256-6875","Frequency":282000000,"ProgramNumber":199,"VideoCodec":"H264","AudioCodec":"AC3","HD":1,"URL":"http://192.168.1.5:5004/a/v11"},{"GuideNumber":"12","GuideName":"DR 2","OriginalNetworkID":100,"TransportStreamID":2,"Modulation":"a8qam256-6875","Frequency":250000000,"ProgramNumber":17548,"VideoCodec":"H264","AudioCodec":"AAC","HD":1,"URL":"http://192.168.1.5:5004/a/v12"},{"GuideNumber":"14","GuideName":"6'eren","OriginalNetworkID":100,"TransportStreamID":8,"Modulation":"a8qam256-6875","Frequency":546000000,"ProgramNumber":503,"VideoCodec":"H264","AudioCodec":"MPEG","HD":1,"URL":"http://192.168.1.5:5004/a/v14"},{"GuideNumber":"16","GuideName":"TLC","OriginalNetworkID":100,"TransportStreamID":25,"Modulation":"a8qam256-6875","Frequency":650000000,"ProgramNumber":11715,"VideoCodec":"H264","AudioCodec":"MPEG","HD":1,"URL":"http://192.168.1.5:5004/a/v16"},{"GuideNumber":"17","GuideName":"Discovery Chann","OriginalNetworkID":100,"TransportStreamID":24,"Modulation":"a8qam256-6875","Frequency":642000000,"ProgramNumber":12794,"VideoCodec":"H264","AudioCodec":"MPEG","HD":1,"URL":"http://192.168.1.5:5004/a/v17"},{"GuideNumber":"18","GuideName":"Investigation D","OriginalNetworkID":100,"TransportStreamID":24,"Modulation":"a8qam256-6875","Frequency":642000000,"ProgramNumber":15206,"VideoCodec":"H264","AudioCodec":"MPEG","HD":1,"URL":"http://192.168.1.5:5004/a/v18"},{"GuideNumber":"19","GuideName":"TV3 MAX","OriginalNetworkID":100,"TransportStreamID":20,"Modulation":"a8qam256-6875","Frequency":578000000,"ProgramNumber":2750,"VideoCodec":"H264","AudioCodec":"AC3","HD":1,"URL":"http://192.168.1.5:5004/a/v19"},{"GuideNumber":"20","GuideName":"MTV Danmark","OriginalNetworkID":100,"TransportStreamID":24,"Modulation":"a8qam256-6875","Frequency":642000000,"ProgramNumber":723,"VideoCodec":"H264","AudioCodec":"MPEG","HD":1,"URL":"http://192.168.1.5:5004/a/v20"},{"GuideNumber":"22","GuideName":"TV 2 FRI","OriginalNetworkID":100,"TransportStreamID":14,"Modulation":"a8qam256-6875","Frequency":682000000,"ProgramNumber":12737,"VideoCodec":"H264","AudioCodec":"AC3","HD":1,"URL":"http://192.168.1.5:5004/a/v22"},{"GuideNumber":"23","GuideName":"dk4","OriginalNetworkID":100,"TransportStreamID":2,"Modulation":"a8qam256-6875","Frequency":250000000,"ProgramNumber":12513,"VideoCodec":"H264","AudioCodec":"AC3","HD":1,"URL":"http://192.168.1.5:5004/a/v23"},{"GuideNumber":"25","GuideName":"National Geogra","OriginalNetworkID":100,"TransportStreamID":12,"Modulation":"a8qam256-6875","Frequency":666000000,"ProgramNumber":10205,"VideoCodec":"H264","AudioCodec":"MPEG","HD":1,"URL":"http://192.168.1.5:5004/a/v25"},{"GuideNumber":"26","GuideName":"National Geogra","OriginalNetworkID":100,"TransportStreamID":14,"Modulation":"a8qam256-6875","Frequency":682000000,"ProgramNumber":1710,"VideoCodec":"H264","AudioCodec":"MPEG","HD":1,"URL":"http://192.168.1.5:5004/a/v26"},{"GuideNumber":"27","GuideName":"DR Ramasjang","OriginalNetworkID":100,"TransportStreamID":7,"Modulation":"a8qam256-6875","Frequency":290000000,"ProgramNumber":17593,"VideoCodec":"H264","AudioCodec":"MPEG","HD":1,"URL":"http://192.168.1.5:5004/a/v27"},{"GuideNumber":"29","GuideName":"Disney Channel","OriginalNetworkID":100,"TransportStreamID":15,"Modulation":"a8qam256-6875","Frequency":690000000,"ProgramNumber":16275,"VideoCodec":"H264","AudioCodec":"MPEG","HD":1,"URL":"http://192.168.1.5:5004/a/v29"},{"GuideNumber":"31","GuideName":"Disney Junior (","OriginalNetworkID":100,"TransportStreamID":12,"Modulation":"a8qam256-6875","Frequency":666000000,"ProgramNumber":157,"VideoCodec":"H264","AudioCodec":"MPEG","URL":"http://192.168.1.5:5004/a/v31"},{"GuideNumber":"33","GuideName":"Nickelodeon","OriginalNetworkID":100,"TransportStreamID":28,"Modulation":"a8qam256-6875","Frequency":698000000,"ProgramNumber":3,"VideoCodec":"H264","AudioCodec":"MPEG","HD":1,"URL":"http://192.168.1.5:5004/a/v33"},{"GuideNumber":"34","GuideName":"Nick Jr.","OriginalNetworkID":100,"TransportStreamID":12,"Modulation":"a8qam256-6875","Frequency":666000000,"ProgramNumber":10257,"VideoCodec":"H264","AudioCodec":"MPEG","HD":1,"URL":"http://192.168.1.5:5004/a/v34"},{"GuideNumber":"36","GuideName":"See","OriginalNetworkID":100,"TransportStreamID":11,"Modulation":"a8qam256-6875","Frequency":570000000,"ProgramNumber":3360,"VideoCodec":"H264","AudioCodec":"AC3","HD":1,"URL":"http://192.168.1.5:5004/a/v36"},{"GuideNumber":"37","GuideName":"TV3 Sport","OriginalNetworkID":100,"TransportStreamID":20,"Modulation":"a8qam256-6875","Frequency":578000000,"ProgramNumber":212,"VideoCodec":"H264","AudioCodec":"AC3","HD":1,"URL":"http://192.168.1.5:5004/a/v37"},{"GuideNumber":"39","GuideName":"TV 2 Sport","OriginalNetworkID":100,"TransportStreamID":10,"Modulation":"a8qam256-6875","Frequency":562000000,"ProgramNumber":77,"VideoCodec":"H264","AudioCodec":"AC3","HD":1,"URL":"http://192.168.1.5:5004/a/v39"},{"GuideNumber":"40","GuideName":"TV 2 Sport X","OriginalNetworkID":100,"TransportStreamID":11,"Modulation":"a8qam256-6875","Frequency":570000000,"ProgramNumber":7209,"VideoCodec":"H264","AudioCodec":"AC3","HD":1,"URL":"http://192.168.1.5:5004/a/v40"},{"GuideNumber":"43","GuideName":"Eurosport 1","OriginalNetworkID":100,"TransportStreamID":10,"Modulation":"a8qam256-6875","Frequency":562000000,"ProgramNumber":10005,"VideoCodec":"H264","AudioCodec":"MPEG","HD":1,"URL":"http://192.168.1.5:5004/a/v43"},{"GuideNumber":"44","GuideName":"Eurosport 2","OriginalNetworkID":100,"TransportStreamID":10,"Modulation":"a8qam256-6875","Frequency":562000000,"ProgramNumber":105,"VideoCodec":"H264","AudioCodec":"MPEG","HD":1,"URL":"http://192.168.1.5:5004/a/v44"},{"GuideNumber":"45","GuideName":"Canal 9","OriginalNetworkID":100,"TransportStreamID":8,"Modulation":"a8qam256-6875","Frequency":546000000,"ProgramNumber":1411,"VideoCodec":"H264","AudioCodec":"MPEG","HD":1,"URL":"http://192.168.1.5:5004/a/v45"},{"GuideNumber":"46","GuideName":"Sport Live","OriginalNetworkID":100,"TransportStreamID":4,"Modulation":"a8qam256-6875","Frequency":266000000,"ProgramNumber":2001,"VideoCodec":"H264","AudioCodec":"MPEG","HD":1,"URL":"http://192.168.1.5:5004/a/v46"},{"GuideNumber":"47","GuideName":"V Sport Ultra H","OriginalNetworkID":100,"TransportStreamID":9,"Modulation":"a8qam256-6875","Frequency":554000000,"ProgramNumber":16870,"VideoCodec":"HEVC","AudioCodec":"AC3","HD":1,"URL":"http://192.168.1.5:5004/a/v47"},{"GuideNumber":"48","GuideName":"V Sport Golf","OriginalNetworkID":100,"TransportStreamID":20,"Modulation":"a8qam256-6875","Frequency":578000000,"ProgramNumber":2730,"VideoCodec":"H264","AudioCodec":"AC3","HD":1,"URL":"http://192.168.1.5:5004/a/v48"},{"GuideNumber":"49","GuideName":"Pixel.tv","OriginalNetworkID":100,"TransportStreamID":28,"Modulation":"a8qam256-6875","Frequency":698000000,"ProgramNumber":5001,"VideoCodec":"H264","AudioCodec":"AC3","HD":1,"URL":"http://192.168.1.5:5004/a/v49"},{"GuideNumber":"50","GuideName":"Animal Planet","OriginalNetworkID":100,"TransportStreamID":13,"Modulation":"a8qam256-6875","Frequency":674000000,"ProgramNumber":10101,"VideoCodec":"H264","AudioCodec":"AC3","HD":1,"URL":"http://192.168.1.5:5004/a/v50"},{"GuideNumber":"60","GuideName":"V Series","OriginalNetworkID":100,"TransportStreamID":15,"Modulation":"a8qam256-6875","Frequency":690000000,"ProgramNumber":11830,"VideoCodec":"H264","AudioCodec":"AC3","HD":1,"URL":"http://192.168.1.5:5004/a/v60"},{"GuideNumber":"61","GuideName":"V Film Premiere","OriginalNetworkID":100,"TransportStreamID":25,"Modulation":"a8qam256-6875","Frequency":650000000,"ProgramNumber":10071,"VideoCodec":"H264","AudioCodec":"AC3","HD":1,"URL":"http://192.168.1.5:5004/a/v61"},{"GuideNumber":"62","GuideName":"V Film Action","OriginalNetworkID":100,"TransportStreamID":13,"Modulation":"a8qam256-6875","Frequency":674000000,"ProgramNumber":11828,"VideoCodec":"H264","AudioCodec":"AC3","HD":1,"URL":"http://192.168.1.5:5004/a/v62"},{"GuideNumber":"63","GuideName":"V Film Hits","OriginalNetworkID":100,"TransportStreamID":12,"Modulation":"a8qam256-6875","Frequency":666000000,"ProgramNumber":11832,"VideoCodec":"H264","AudioCodec":"AC3","HD":1,"URL":"http://192.168.1.5:5004/a/v63"},{"GuideNumber":"64","GuideName":"V Film Family (","OriginalNetworkID":100,"TransportStreamID":13,"Modulation":"a8qam256-6875","Frequency":674000000,"ProgramNumber":13,"VideoCodec":"H264","AudioCodec":"MPEG","HD":1,"URL":"http://192.168.1.5:5004/a/v64"},{"GuideNumber":"68","GuideName":"Viasat History","OriginalNetworkID":100,"TransportStreamID":15,"Modulation":"a8qam256-6875","Frequency":690000000,"ProgramNumber":13092,"VideoCodec":"H264","AudioCodec":"MPEG","HD":1,"URL":"http://192.168.1.5:5004/a/v68"},{"GuideNumber":"69","GuideName":"Viasat Nature","OriginalNetworkID":100,"TransportStreamID":26,"Modulation":"a8qam256-6875","Frequency":658000000,"ProgramNumber":13093,"VideoCodec":"H264","AudioCodec":"MPEG","HD":1,"URL":"http://192.168.1.5:5004/a/v69"},{"GuideNumber":"70","GuideName":"Viasat Explore","OriginalNetworkID":100,"TransportStreamID":26,"Modulation":"a8qam256-6875","Frequency":658000000,"ProgramNumber":13094,"VideoCodec":"H264","AudioCodec":"MPEG","HD":1,"URL":"http://192.168.1.5:5004/a/v70"},{"GuideNumber":"73","GuideName":"VH1 (SD)","OriginalNetworkID":100,"TransportStreamID":13,"Modulation":"a8qam256-6875","Frequency":674000000,"ProgramNumber":219,"VideoCodec":"MPEG2","AudioCodec":"MPEG","URL":"http://192.168.1.5:5004/a/v73"},{"GuideNumber":"74","GuideName":"MTV 80s (SD)","OriginalNetworkID":100,"TransportStreamID":24,"Modulation":"a8qam256-6875","Frequency":642000000,"ProgramNumber":28657,"VideoCodec":"MPEG2","AudioCodec":"MPEG","URL":"http://192.168.1.5:5004/a/v74"},{"GuideNumber":"75","GuideName":"Uptown TV","OriginalNetworkID":100,"TransportStreamID":1,"Modulation":"a8qam256-6875","Frequency":242000000,"ProgramNumber":3520,"VideoCodec":"H264","AudioCodec":"AC3","HD":1,"URL":"http://192.168.1.5:5004/a/v75"},{"GuideNumber":"76","GuideName":"Uptown Classic","OriginalNetworkID":100,"TransportStreamID":3,"Modulation":"a8qam256-6875","Frequency":258000000,"ProgramNumber":10641,"VideoCodec":"H264","AudioCodec":"AC3","HD":1,"URL":"http://192.168.1.5:5004/a/v76"},{"GuideNumber":"81","GuideName":"TV 2|ØSTJYLLAN","OriginalNetworkID":100,"TransportStreamID":16,"Modulation":"a8qam256-6875","Frequency":298000000,"ProgramNumber":704,"VideoCodec":"H264","AudioCodec":"AAC","HD":1,"URL":"http://192.168.1.5:5004/a/v81"},{"GuideNumber":"82","GuideName":"TV SYD+","OriginalNetworkID":100,"TransportStreamID":16,"Modulation":"a8qam256-6875","Frequency":298000000,"ProgramNumber":701,"VideoCodec":"H264","AudioCodec":"AAC","HD":1,"URL":"http://192.168.1.5:5004/a/v82"},{"GuideNumber":"83","GuideName":"Kanal Østjylla","OriginalNetworkID":100,"Modulation":"a8qam256-6875","Frequency":234000000,"ProgramNumber":10335,"VideoCodec":"H264","AudioCodec":"AAC","URL":"http://192.168.1.5:5004/a/v83"},{"GuideNumber":"84","GuideName":"Kanal Syd (SD)","OriginalNetworkID":100,"Modulation":"a8qam256-6875","Frequency":234000000,"ProgramNumber":10336,"VideoCodec":"H264","AudioCodec":"AAC","URL":"http://192.168.1.5:5004/a/v84"},{"GuideNumber":"87","GuideName":"SVT1","OriginalNetworkID":100,"TransportStreamID":4,"Modulation":"a8qam256-6875","Frequency":266000000,"ProgramNumber":1610,"VideoCodec":"H264","AudioCodec":"AC3","HD":1,"URL":"http://192.168.1.5:5004/a/v87"},{"GuideNumber":"89","GuideName":"TV4 Sverige","OriginalNetworkID":100,"TransportStreamID":3,"Modulation":"a8qam256-6875","Frequency":258000000,"ProgramNumber":10054,"VideoCodec":"H264","AudioCodec":"AAC","HD":1,"URL":"http://192.168.1.5:5004/a/v89"},{"GuideNumber":"90","GuideName":"NRK1","OriginalNetworkID":100,"TransportStreamID":18,"Modulation":"a8qam256-6875","Frequency":314000000,"ProgramNumber":12001,"VideoCodec":"H264","AudioCodec":"AC3","HD":1,"URL":"http://192.168.1.5:5004/a/v90"},{"GuideNumber":"91","GuideName":"TV2 Norge","OriginalNetworkID":100,"TransportStreamID":17,"Modulation":"a8qam256-6875","Frequency":306000000,"ProgramNumber":6401,"VideoCodec":"H264","AudioCodec":"MPEG","HD":1,"URL":"http://192.168.1.5:5004/a/v91"},{"GuideNumber":"92","GuideName":"ARD Das Erste","OriginalNetworkID":100,"TransportStreamID":1,"Modulation":"a8qam256-6875","Frequency":242000000,"ProgramNumber":10116,"VideoCodec":"H264","AudioCodec":"AC3","HD":1,"URL":"http://192.168.1.5:5004/a/v92"},{"GuideNumber":"93","GuideName":"ZDF","OriginalNetworkID":100,"TransportStreamID":6,"Modulation":"a8qam256-6875","Frequency":282000000,"ProgramNumber":11110,"VideoCodec":"H264","AudioCodec":"AC3","HD":1,"URL":"http://192.168.1.5:5004/a/v93"},{"GuideNumber":"95","GuideName":"RTL","OriginalNetworkID":100,"TransportStreamID":18,"Modulation":"a8qam256-6875","Frequency":314000000,"ProgramNumber":61200,"VideoCodec":"H264","AudioCodec":"AC3","HD":1,"URL":"http://192.168.1.5:5004/a/v95"},{"GuideNumber":"96","GuideName":"SAT.1","OriginalNetworkID":100,"TransportStreamID":18,"Modulation":"a8qam256-6875","Frequency":314000000,"ProgramNumber":12476,"VideoCodec":"H264","AudioCodec":"AC3","HD":1,"URL":"http://192.168.1.5:5004/a/v96"},{"GuideNumber":"97","GuideName":"France 24","OriginalNetworkID":100,"TransportStreamID":2,"Modulation":"a8qam256-6875","Frequency":250000000,"ProgramNumber":10242,"VideoCodec":"H264","AudioCodec":"AC3","HD":1,"URL":"http://192.168.1.5:5004/a/v97"},{"GuideNumber":"99","GuideName":"FOLKETINGET","OriginalNetworkID":100,"TransportStreamID":2,"Modulation":"a8qam256-6875","Frequency":250000000,"ProgramNumber":10341,"VideoCodec":"H264","AudioCodec":"MPEG","HD":1,"URL":"http://192.168.1.5:5004/a/v99"},{"GuideNumber":"201","GuideName":"TV 2 (MidtVest)","OriginalNetworkID":100,"TransportStreamID":5,"Modulation":"a8qam256-6875","Frequency":274000000,"ProgramNumber":193,"VideoCodec":"H264","AudioCodec":"AC3","HD":1,"URL":"http://192.168.1.5:5004/a/v201"},{"GuideNumber":"202","GuideName":"TV 2 (Nord)","OriginalNetworkID":100,"TransportStreamID":5,"Modulation":"a8qam256-6875","Frequency":274000000,"ProgramNumber":196,"VideoCodec":"H264","AudioCodec":"AC3","HD":1,"URL":"http://192.168.1.5:5004/a/v202"},{"GuideNumber":"206","GuideName":"TV MIDTVEST","OriginalNetworkID":100,"TransportStreamID":16,"Modulation":"a8qam256-6875","Frequency":298000000,"ProgramNumber":703,"VideoCodec":"H264","AudioCodec":"AAC","HD":1,"URL":"http://192.168.1.5:5004/a/v206"},{"GuideNumber":"207","GuideName":"TV2 Nord Salto","OriginalNetworkID":100,"TransportStreamID":16,"Modulation":"a8qam256-6875","Frequency":298000000,"ProgramNumber":700,"VideoCodec":"H264","AudioCodec":"AAC","HD":1,"URL":"http://192.168.1.5:5004/a/v207"},{"GuideNumber":"500","GuideName":"Waoo Test8700","OriginalNetworkID":100,"Modulation":"a8qam256-6875","Frequency":234000000,"ProgramNumber":100,"VideoCodec":"H264","URL":"http://192.168.1.5:5004/a/v500"},{"GuideNumber":"801","GuideName":"DR1Syn","OriginalNetworkID":100,"Modulation":"a8qam256-6875","Frequency":234000000,"ProgramNumber":10466,"VideoCodec":"H264","AudioCodec":"AAC","HD":1,"URL":"http://192.168.1.5:5004/a/v801"},{"GuideNumber":"802","GuideName":"DR2Syn","OriginalNetworkID":100,"TransportStreamID":1,"Modulation":"a8qam256-6875","Frequency":242000000,"ProgramNumber":802,"VideoCodec":"H264","AudioCodec":"AAC","HD":1,"URL":"http://192.168.1.5:5004/a/v802"},{"GuideNumber":"5000","GuideName":"NDR 1 Welle Nor","OriginalNetworkID":100,"Modulation":"a8qam256-6875","Frequency":234000000,"ProgramNumber":188,"AudioCodec":"AC3","URL":"http://192.168.1.5:5004/a/v5000"},{"GuideNumber":"5001","GuideName":"RTL Radio Deuts","OriginalNetworkID":100,"Modulation":"a8qam256-6875","Frequency":234000000,"ProgramNumber":601,"AudioCodec":"MPEG","URL":"http://192.168.1.5:5004/a/v5001"},{"GuideNumber":"5002","GuideName":"DR-P3","OriginalNetworkID":100,"TransportStreamID":4,"Modulation":"a8qam256-6875","Frequency":266000000,"ProgramNumber":608,"AudioCodec":"MPEG","URL":"http://192.168.1.5:5004/a/v5002"},{"GuideNumber":"5003","GuideName":"DR-P2","OriginalNetworkID":100,"TransportStreamID":4,"Modulation":"a8qam256-6875","Frequency":266000000,"ProgramNumber":613,"AudioCodec":"MPEG","URL":"http://192.168.1.5:5004/a/v5003"},{"GuideNumber":"5004","GuideName":"DR-P4 Østjylla","OriginalNetworkID":100,"TransportStreamID":4,"Modulation":"a8qam256-6875","Frequency":266000000,"ProgramNumber":8002,"AudioCodec":"MPEG","URL":"http://192.168.1.5:5004/a/v5004"},{"GuideNumber":"5005","GuideName":"DR-P4 Trekanten","OriginalNetworkID":100,"TransportStreamID":4,"Modulation":"a8qam256-6875","Frequency":266000000,"ProgramNumber":8003,"AudioCodec":"MPEG","URL":"http://192.168.1.5:5004/a/v5005"},{"GuideNumber":"5006","GuideName":"DR-P4 Syd","OriginalNetworkID":100,"TransportStreamID":4,"Modulation":"a8qam256-6875","Frequency":266000000,"ProgramNumber":8004,"AudioCodec":"MPEG","URL":"http://192.168.1.5:5004/a/v5006"},{"GuideNumber":"5007","GuideName":"NDR 2","OriginalNetworkID":100,"TransportStreamID":1,"Modulation":"a8qam256-6875","Frequency":242000000,"ProgramNumber":188,"AudioCodec":"AAC","URL":"http://192.168.1.5:5004/a/v5007"},{"GuideNumber":"5008","GuideName":"NRK P1","OriginalNetworkID":100,"TransportStreamID":1,"Modulation":"a8qam256-6875","Frequency":242000000,"ProgramNumber":1503,"AudioCodec":"AAC","URL":"http://192.168.1.5:5004/a/v5008"},{"GuideNumber":"5009","GuideName":"NRK P3","OriginalNetworkID":100,"TransportStreamID":1,"Modulation":"a8qam256-6875","Frequency":242000000,"ProgramNumber":1505,"AudioCodec":"AAC","URL":"http://192.168.1.5:5004/a/v5009"},{"GuideNumber":"5010","GuideName":"NRK mP3","OriginalNetworkID":100,"TransportStreamID":1,"Modulation":"a8qam256-6875","Frequency":242000000,"ProgramNumber":1515,"AudioCodec":"AAC","URL":"http://192.168.1.5:5004/a/v5010"},{"GuideNumber":"5011","GuideName":"DR-P8 Jazz","OriginalNetworkID":100,"TransportStreamID":1,"Modulation":"a8qam256-6875","Frequency":242000000,"ProgramNumber":8015,"AudioCodec":"MPEG","URL":"http://192.168.1.5:5004/a/v5011"},{"GuideNumber":"5012","GuideName":"NRK Jazz","OriginalNetworkID":100,"TransportStreamID":2,"Modulation":"a8qam256-6875","Frequency":250000000,"ProgramNumber":3516,"AudioCodec":"AAC","URL":"http://192.168.1.5:5004/a/v5012"},{"GuideNumber":"5013","GuideName":"DR-P5","OriginalNetworkID":100,"TransportStreamID":5,"Modulation":"a8qam256-6875","Frequency":274000000,"ProgramNumber":8011,"AudioCodec":"MPEG","URL":"http://192.168.1.5:5004/a/v5013"},{"GuideNumber":"5014","GuideName":"DR-P6 Beat","OriginalNetworkID":100,"TransportStreamID":5,"Modulation":"a8qam256-6875","Frequency":274000000,"ProgramNumber":8012,"AudioCodec":"MPEG","URL":"http://192.168.1.5:5004/a/v5014"},{"GuideNumber":"5015","GuideName":"The Voice Købe","OriginalNetworkID":100,"TransportStreamID":7,"Modulation":"a8qam256-6875","Frequency":290000000,"ProgramNumber":8018,"AudioCodec":"MPEG","URL":"http://192.168.1.5:5004/a/v5015"},{"GuideNumber":"5016","GuideName":"Nova FM","OriginalNetworkID":100,"TransportStreamID":7,"Modulation":"a8qam256-6875","Frequency":290000000,"ProgramNumber":8021,"AudioCodec":"MPEG","URL":"http://192.168.1.5:5004/a/v5016"},{"GuideNumber":"5017","GuideName":"Pop FM","OriginalNetworkID":100,"TransportStreamID":7,"Modulation":"a8qam256-6875","Frequency":290000000,"ProgramNumber":8022,"AudioCodec":"MPEG","URL":"http://192.168.1.5:5004/a/v5017"},{"GuideNumber":"5018","GuideName":"Radio 100","OriginalNetworkID":100,"TransportStreamID":7,"Modulation":"a8qam256-6875","Frequency":290000000,"ProgramNumber":8023,"AudioCodec":"MPEG","URL":"http://192.168.1.5:5004/a/v5018"},{"GuideNumber":"5019","GuideName":"Radio4","OriginalNetworkID":100,"TransportStreamID":7,"Modulation":"a8qam256-6875","Frequency":290000000,"ProgramNumber":8024,"AudioCodec":"MPEG","URL":"http://192.168.1.5:5004/a/v5019"},{"GuideNumber":"5020","GuideName":"DR-P1","OriginalNetworkID":100,"TransportStreamID":3,"Modulation":"a8qam256-6875","Frequency":258000000,"ProgramNumber":607,"AudioCodec":"MPEG","URL":"http://192.168.1.5:5004/a/v5020"},{"GuideNumber":"5021","GuideName":"Planet Rock","OriginalNetworkID":100,"TransportStreamID":3,"Modulation":"a8qam256-6875","Frequency":258000000,"ProgramNumber":8028,"AudioCodec":"MPEG","URL":"http://192.168.1.5:5004/a/v5021"}]

 

Edited by wazer
Link to comment
Share on other sites

I'll do #1 for your :

#include <Array.au3>

Local $sText = FileRead("lineup-original.json")
Local $aArray = StringRegExp($sText, '(?s)"(?|GuideNumber|GuideName|URL)":"([^"]*)', 3)
Local $aList = _Array_Resize($aArray, 3)
_ArrayDisplay($aList)

Func _Array_Resize(ByRef $aArray1d, $iColumns, $iStart = Default)
  If $iStart = Default Then $iStart = 0
  Local $iElements = UBound($aArray1d) - $iStart
  If Mod($iElements, $iColumns) <> 0 Then Return SetError(1, 0, False)

  Local $aArray2d[$iElements / $iColumns][$iColumns]

  Local $iRow = 0
  For $i = $iStart To UBound($aArray1d) - 1
    $aArray2d[$iRow][Mod($i, $iColumns)] = $aArray1d[$i]
    ; If this is the end of a column, increase the row counter
    If Mod($i, $iColumns) = $iColumns - 1 Then $iRow += 1
  Next
  Return $aArray2d
EndFunc   ;==>_Array_Resize

Now try to do #2 to #5

Link to comment
Share on other sites

52 minutes ago, Nine said:

I'll do #1 for your :

#include <Array.au3>

Local $sText = FileRead("lineup-original.json")
Local $aArray = StringRegExp($sText, '(?s)"(?|GuideNumber|GuideName|URL)":"([^"]*)', 3)
Local $aList = _Array_Resize($aArray, 3)
_ArrayDisplay($aList)

Func _Array_Resize(ByRef $aArray1d, $iColumns, $iStart = Default)
  If $iStart = Default Then $iStart = 0
  Local $iElements = UBound($aArray1d) - $iStart
  If Mod($iElements, $iColumns) <> 0 Then Return SetError(1, 0, False)

  Local $aArray2d[$iElements / $iColumns][$iColumns]

  Local $iRow = 0
  For $i = $iStart To UBound($aArray1d) - 1
    $aArray2d[$iRow][Mod($i, $iColumns)] = $aArray1d[$i]
    ; If this is the end of a column, increase the row counter
    If Mod($i, $iColumns) = $iColumns - 1 Then $iRow += 1
  Next
  Return $aArray2d
EndFunc   ;==>_Array_Resize

Now try to do #2 to #5

For starters thanks for helping out and teaching me, I really appreciate it

This out my league, I manage to get wishorder into 1d array, from that point I'm reading but not getting anywhere.
 

wishOrder()

Func wishOrder()
        Local $aArrayReadFrom, $sFilePath = @scriptdir & "\wishOrder.txt"

        _FileReadToArray($sFilePath, $aArrayReadFrom)
        _ArrayDisplay($aArrayReadFrom)
EndFunc

 

Edited by wazer
Link to comment
Share on other sites

Alright then, I'll produce the script for you.  Study it so you can grasp the functions I used.  Happy learning :

#include <Array.au3>

Local $sText = FileRead("lineup-original.json")
Local $aArray = StringRegExp($sText, '(?s)"(?|GuideNumber|GuideName|URL)":"([^"]*)', 3)
Local $aList = _Array_Resize($aArray, 3)
;_ArrayDisplay($aList)
$aArray = FileReadToArray("wishOrder.txt")
Local $iInd
ReDim $aList[UBound($aList)][4]
For $i = 0 to UBound($aArray) - 1
  $iInd = _ArraySearch($aList, $aArray[$i], Default, Default, Default, Default, Default, 0)
  If @error Then
    ConsoleWrite("Invalid entry " & $aArray[$i] & @CRLF & @CRLF)
    ContinueLoop
  EndIf
  ConsoleWrite($aArray[$i] & " " & $aList[$iInd][1] & @CRLF & $aList[$iInd][2] & @CRLF & @CRLF)
  $aList[$iInd][3] = True
Next
Local $aMissing = _ArrayFindAll($aList, 0, Default, Default, Default, Default, 3)
_ArrayDisplay($aMissing)

Func _Array_Resize(ByRef $aArray1d, $iColumns, $iStart = Default)
  If $iStart = Default Then $iStart = 0
  Local $iElements = UBound($aArray1d) - $iStart
  If Mod($iElements, $iColumns) <> 0 Then Return SetError(1, 0, False)

  Local $aArray2d[$iElements / $iColumns][$iColumns]

  Local $iRow = 0
  For $i = $iStart To UBound($aArray1d) - 1
    $aArray2d[$iRow][Mod($i, $iColumns)] = $aArray1d[$i]
    If Mod($i, $iColumns) = $iColumns - 1 Then $iRow += 1
  Next
  Return $aArray2d
EndFunc   ;==>_Array_Resize

 

Link to comment
Share on other sites

5 hours ago, Nine said:

Alright then, I'll produce the script for you.  Study it so you can grasp the functions I used.  Happy learning :

#include <Array.au3>

Local $sText = FileRead("lineup-original.json")
Local $aArray = StringRegExp($sText, '(?s)"(?|GuideNumber|GuideName|URL)":"([^"]*)', 3)
Local $aList = _Array_Resize($aArray, 3)
;_ArrayDisplay($aList)
$aArray = FileReadToArray("wishOrder.txt")
Local $iInd
ReDim $aList[UBound($aList)][4]
For $i = 0 to UBound($aArray) - 1
  $iInd = _ArraySearch($aList, $aArray[$i], Default, Default, Default, Default, Default, 0)
  If @error Then
    ConsoleWrite("Invalid entry " & $aArray[$i] & @CRLF & @CRLF)
    ContinueLoop
  EndIf
  ConsoleWrite($aArray[$i] & " " & $aList[$iInd][1] & @CRLF & $aList[$iInd][2] & @CRLF & @CRLF)
  $aList[$iInd][3] = True
Next
Local $aMissing = _ArrayFindAll($aList, 0, Default, Default, Default, Default, 3)
_ArrayDisplay($aMissing)

Func _Array_Resize(ByRef $aArray1d, $iColumns, $iStart = Default)
  If $iStart = Default Then $iStart = 0
  Local $iElements = UBound($aArray1d) - $iStart
  If Mod($iElements, $iColumns) <> 0 Then Return SetError(1, 0, False)

  Local $aArray2d[$iElements / $iColumns][$iColumns]

  Local $iRow = 0
  For $i = $iStart To UBound($aArray1d) - 1
    $aArray2d[$iRow][Mod($i, $iColumns)] = $aArray1d[$i]
    If Mod($i, $iColumns) = $iColumns - 1 Then $iRow += 1
  Next
  Return $aArray2d
EndFunc   ;==>_Array_Resize

 

I cant express how much gratitude I feel for this.

I watched and looked into this and scratched my head for hours, and I still cant figure this masterpiece out.

I wanted to change direction a bit to do wish order for names instead of numbers.

I cant figure out how to let it show missing colums with GuideNumber or GuideName instead of row

Also ran in to troubles by having 2 channels having the same name and would report the last known being missing from the list.

The names are scanned in the dvb-c network and some of them missing chars and have a MAX length hence why "National Geogra" in row 20 and 21 collides with each other

wishOrder-by-name
 

DR 1
DR 2
TV 2 (Østjylla
TV 2 (Syd)
TV 2 (MidtVest)
TV 2 (Nord)
TV 2 Zulu
TV 2 FRI
TV 2 Charlie
TV 2 Sport
TV 2 Sport X
TV 2 NEWS
TV3
TV3+
TV3 Puls
TV3 MAX
TV3 Sport
See
dk4
Kanal 4
Kanal 5
6'eren
Canal 9
TLC
Discovery Chann
Investigation D
National Geogra
National Geogra
Animal Planet
Viasat History
Viasat Nature
Viasat Explore
V Series
V Film Premiere
V Film Action
V Film Hits
V Film Family (
V Sport Ultra H
V Sport Golf
Eurosport 1
Eurosport 2
Sport Live
MTV Danmark
MTV 80s (SD)
VH1 (SD)
Uptown TV
Uptown Classic
Pixel.tv
TV SYD+
Kanal Syd (SD)
Kanal Østjylla
TV 2|ØSTJYLLAN
TV MIDTVEST
TV2 Nord Salto
FOLKETINGET
TV2 Norge
SVT1
TV4 Sverige
NRK1
ARD Das Erste
ZDF
RTL
SAT.1
France 24
DR Ramasjang
Disney Channel
Disney Junior (
Nickelodeon
Nick Jr.
DR-P1
DR-P2
DR-P3
DR-P4 Østjylla
DR-P4 Trekanten
DR-P4 Syd
DR-P5
DR-P6 Beat
DR-P8 Jazz
Radio 100
The Voice Købe
Nova FM
Pop FM
Radio4
Planet Rock
NDR 1 Welle Nor
NDR 2
RTL Radio Deuts
NRK P1
NRK P3
NRK mP3
NRK Jazz



Code

#include <JSON.au3>
#include <Array.au3>
#include <File.au3>
#include <MsgBoxConstants.au3>
;~ $oHttp = ObjCreate("winHttp.winHttpRequest.5.1")
;~ $ApiUrl = "http://192.168.1.5/lineup.json"
;~ $oHttp.open("GET", $APIURL)
;~ $oHttp.send()
;~ $result = $oHttp.ResponseText
;~ ConsoleWrite($result)


;~ Local $sText = $result
Local $sText = FileRead("lineup-original.json")
Local $aArray = StringRegExp($sText, '(?s)"(?|GuideNumber|GuideName|URL)":"([^"]*)', 3)
Local $aList = _Array_Resize($aArray, 3)
;_ArrayDisplay($aList)

;Consolewrite entire channel info
_ArrayToString($aList)
ConsoleWrite (_ArrayToString($aList) & @CRLF & @CRLF)

$aArray = FileReadToArray("wishOrder-by-name.txt")
Local $iInd
ReDim $aList[UBound($aList)][4]
For $i = 0 to UBound($aArray) - 1
  $iInd = _ArraySearch($aList, $aArray[$i], Default, Default, Default, Default, Default, 1); Change this number to 1 to pick up colum 1 GuideName instead of colum 0 GuideNumber
  If @error Then
    ConsoleWrite("Invalid entry " & $aArray[$i] & @CRLF & @CRLF)
    ContinueLoop
  EndIf
;~ Dummy to see what it should look like
;~ consolewrite('#EXTINF:-1 tvg-id="1" tvg-name="DR1" tvg-chno="1" tvg-logo="https://i.imgur.com/uAAa4VM.png" tvg-type="tv",DR 1' & @CRLF)
;~
;~ Original code
;~ ConsoleWrite($aArray[$i] & " " & $aList[$iInd][1] & @CRLF & $aList[$iInd][2] & @CRLF & @CRLF)
  ConsoleWrite('#EXTINF:-1 tvg-id="' & $aArray[$i] & '"' & " " & "tvg-name=" & '"' & $aList[$iInd][1] & '"' & " " & "tvg-chno=" & '"' & $aArray[$i] & '"' & " " & "tvg-logo=" & '"' & "https://i.imgur.com/PNG LOGO HERE" & '"' & " " & "tvg-type=" & '"' & "tv" & '"' & ',' & $aList[$iInd][1] & @CRLF & $aList[$iInd][2] & @CRLF & @CRLF)
  $aList[$iInd][3] = true

Next
Local $aMissing = _ArrayFindAll($aList, 0, Default, Default, Default, Default, 3)

;Display missing
_ArrayDisplay($aMissing)

;Console write missing
Local $aList = _Array_Resize($aMissing, 1); Set size of row you want to display to ArrayToString
ConsoleWrite(_ArrayToString($aList) & @CRLF & @CRLF)


Func _Array_Resize(ByRef $aArray1d, $iColumns, $iStart = Default)
  If $iStart = Default Then $iStart = 0
  Local $iElements = UBound($aArray1d) - $iStart
  If Mod($iElements, $iColumns) <> 0 Then Return SetError(1, 0, False)

  Local $aArray2d[$iElements / $iColumns][$iColumns]

  Local $iRow = 0
  For $i = $iStart To UBound($aArray1d) - 1
    $aArray2d[$iRow][Mod($i, $iColumns)] = $aArray1d[$i]
    If Mod($i, $iColumns) = $iColumns - 1 Then $iRow += 1
  Next
  Return $aArray2d
EndFunc   ;==>_Array_Resize

 

wishOrder-by-name.txt

Edited by wazer
Link to comment
Share on other sites

@wazer

There are number of Json UDF available on forum
have you not tried any of those to extract your Json file.... 

hint :)

;~ method 1
;~ ===================
For $i = 0 To UBound($o_wishOrderArray) - 1
    ;~ use correct json method to extract from Json string
Next
;~ ===================


;~ method 2
;~ ===================
Local $o_String = ''
For $okey in $$o_JsonString
    ;~ extract required field (GuideNumber & GuideName& URL)
    $o_String &= ......
Next

;~ after done rearrange as per wishOrder list.
;~ ===================

 

Link to comment
Share on other sites

9 hours ago, wazer said:

I cant figure out how to let it show missing colums with GuideNumber or GuideName instead of row

You need to perform a For...Next loop and use the row number as the indice to the $aList array.  Do not resize the $aMissing array as it will complexify your array for nothing.

10 hours ago, wazer said:

Also ran in to troubles by having 2 channels having the same name and would report the last known being missing from the list.

What do you want to do when this is happening ? Select the 2 ?  Select the one not selected so far ?

Link to comment
Share on other sites

7 hours ago, Nine said:

You need to perform a For...Next loop and use the row number as the indice to the $aList array.  Do not resize the $aMissing array as it will complexify your array for nothing.

I tried but could not figure out, I could get it to say true 4 times and get the 1st 4 chan nammes which indicate i'm on the wrong colum and the code was wrong too.

I then tried extracting and give overlay which was positive to my eyes which indicate whats missing in true.


Local $Extract = _ArrayExtract($aList)
_ArrayDisplay($Extract)

Tho would like it still to turn into consolewrite as I hope to make this gui based later on for others to use too, Have yet to see a windows based tool that can extract and do these things.
 

7 hours ago, Nine said:

What do you want to do when this is happening ? Select the 2 ?  Select the one not selected so far ?

I want it to select both or more which could be a problem later on if provider gets 2+ channels naming the same but does not count for length in the dvb-c network where the channels max out as with channel 25 "National Neographic Wild" and channel 26 "National Geographic"

Link to comment
Share on other sites

18 minutes ago, wazer said:

I tried but could not figure out, I could get it to say true 4 times and get the 1st 4 chan nammes which indicate i'm on the wrong colum and the code was wrong too.

Show me your loop so I can see was it the problem.  I won't do it for you this time ;)

21 minutes ago, wazer said:

I want it to select both or more which could be a problem later

Then you will need to use _ArrayFindAll instead of _ArraySearch, and use a For...Next again to select them all.  BTW you could count the number of channels selected and inform that it overpass the limit (just an idea).

Link to comment
Share on other sites

52 minutes ago, Nine said:

Show me your loop so I can see was it the problem.  I won't do it for you this time ;)

Then you will need to use _ArrayFindAll instead of _ArraySearch, and use a For...Next again to select them all.  BTW you could count the number of channels selected and inform that it overpass the limit (just an idea).

Don't laugh I'm a scrub and reading the help files but I just dont get that code you made

for $1 = 0 to ubound($aMissing)
 ConsoleWrite($aList[$1][1] & @CRLF)
next

For $i = 0 To UBound($aMissing)
 ConsoleWrite( $aList[$i][3] & @CRLF)
Next

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...