Well, hi folks!
I got a somewhat strange error while processing a plist file with AppleScript.
I don’t know which information would be relevant (it’s an extremely long script) but maybe this is enough:
- I’m storing the plist file’s contents within a variable by executing a shellscript with the “more” command.
- then I’m cleaning the text within this variable with some item delimiter functions of TABs, RETURNs and 0-characters.
- after that, I store each line of text in an array.
- then I’m scanning for information I want to extract and store these in other variables.
For the last part I use a repeat loop. But this will give me an error while processing the very last line of text. Strange.
I already made use of a “try” statement - with no effect. And that’s what I don’t understand.
-- linelist contains the text from the plist file. it's an array with one element for each line of text set textscan to true set line_num to 0 repeat while textscan set line_num to line_num + 1 try set this_line to item line_num of linelist on error display dialog "exiting at " & line_num & " of " & length of linelist & " rows" exit repeat end try
The whole try/on error/end try statement will be highlighted by Script Editor and I get the alert: “An error of type -116 has occurred.”
Shouldn’t the error handler be invoked when an error occures???
I hope somebody can help me!
Thank you very much!