Here is my code:
Code: Select all
--Get data from file
answer file ""
put empty into theData
put url ("file:" & it) into theData
if theData is empty then break
--put data in a temp (hidden) data grid
set the dgText of group "MainGridTemp" to theData
--put formatted data into an array
put the dgData of group "MainGridTemp" into gridArray
--add data to data grid
dispatch "AddData" to group "MainGrid" with gridArray