Sample Header Ad - 728x90

Applescript remove Missing value and unwanted data

0 votes
1 answer
1082 views
I created a script to return some credit card informations from an internal website CC
Info ", " Visa (9999) ", " Visa (8888) ", " Visa (7777) ", " Visa (666) ", " Alipay ", missing value, missing value, missing value} I have two issue with my script, 1. I can't get rid of the first link with is not a CC numbers tried : set myRawData to items 2 thru -1 of myRawData as string but don't seems to work. 2. I don't manage to remove all the missing values. 3. Can I remove some entry from the list that contain "none" ? Here is my full script tell application "Google Chrome" tell active tab of window 1 to set myRawData to execute javascript "var outPut=[]; var arr=document.getElementsByClassName('sortable fraudScoringTransactionCCSummary');for (var i in arr) {outPut.push(arr[i].innerHTML)};outPut;" end tell ## set myRawData to items 2 thru -1 of myRawData as string -- not working set myNewList to {} repeat with each from 1 to count of items of myRawData set itemOnMyList to item each of myRawData if itemOnMyList is in myRawData and itemOnMyList is not in myNewList then set end of myNewList to itemOnMyList end repeat ## not sur ##set myNewList to items 2 thru -1 of myNewList -- not working set countHowManyCC to count myNewList return countHowManyCC
Asked by Kevin (2468 rep)
May 11, 2018, 08:17 AM
Last activity: May 11, 2018, 01:37 PM