Hi Folks,
on awake from nib theObject
set theFile to alias ((path to desktop as Unicode text) & "received.txt")
set num_list to paragraphs of (read theFile)
set myList to {}
set {tid, text item delimiters} to {text item delimiters, ";"}
repeat with num in num_list
set end of myList to text items 1 thru 3 of num
end repeat
set text item delimiters to tid
set content of theObject to myList
end awake from nib
I read from the file “received.txt” data which is separeted by “;” - that means everything which is between “;” should be put into one row -
if the file looks like
abcdef;abcdef;abcdef;
ssff;asdfsdfj;adsdfk
abcdef;abcdef;abcdef;
sdfsd;sdafksdf;dfasdj
abcdef;abcdef;abcdef;
asdsdf;dafsdf;dafsdfa
everything works fine!
But if the file looks like this:
[code]In;+731552;
57656C636F6D6520746F206D7946617665732E20476F20746F20746865206D61696E2073637265656E20746F207365742075702E205469703A205570206172726F7720666F722063616C6C206C6F672E
OK
;
In;+731552;
Your myFaves contacts have been refreshed.
OK
;
In;+731552;
You’re only allowed to change each contact once a month. Please try again after the 1st of next month. See www.myfaves.co.uk for full T&Cs
OK
;
In;+731552;
Your myFaves contacts have been refreshed.
OK
;
In;+731552;
Your myFaves contacts have been refreshed.
OK
;[/code]
then it stops with an error message:
May you can advise me how to solve this…
Thanks for your help!
Stefan