I have an "excel-like" spreadsheet Metacard stack with 26 multiple scrolling 
fields and 1000 lines of data. The "export" function takes several minutes to 
work! My script is:
on writeFile content,filePath
  open file filePath
  write content  to file filePath
  close file filePath
end writeFile
on toComputer
  cur
  lock recent
  lock messages
  lock screen
end toComputer
on cur
  set cursor to busy
end cur
on mouseUp
  toComputer
  set numberFormat to "0"
  put empty into  fld "The Text"
  repeat with y= 1 to 1000
    repeat with x = 1 to 26
      put line y of  bg fld  ("c"&x)  & tab after fld "The Text"
    end repeat
    put return after fld "The Text"
  end repeat
   put exportFileDialog() into filePath
  if word 1 of filePath is not "error" then
    cur
    writeFile (bg fld "The Text" && return),filePath
    answer "The export file is complete." -- ∆
  end if
  ---
end mouseUp
function exportFileDialog
  ask file "Create export file for this column named:" with "Export File.txt" 
-- ∆
  if (it is empty) or (the result is cancel) then return "Error : cancelled"
  else return it
end exportFileDialog

Any ideas to speed up the process. the same problem occurs with the import 
function of very large data files.
[EMAIL PROTECTED]

Archives: http://www.mail-archive.com/[email protected]/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.

Reply via email to