I created a script to return some credit card informations from an internal website
<a href=\"/web/Support.aa/aa/g55erefesfsfsf/4.g.g.5.24.54\">
CC<br>Info
</a>
", "
Visa (9999)
", "
Visa (8888)
", "
Visa (7777)
", "
Visa (666)
", "
Alipay
", missing value, missing value, missing value}
I have two issue with my script,
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.
I don't manage to remove all the missing values.
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
list
as posted because it's missing an opening curly brace and a opening double quote{"
. Second, you asked "Can I remove some entry from the list that contain "none" ?", well there are no entries in the output you posted that contain "none"! Do you perhaps actually mean "missing value"?