I write a programm with two tableviews: "dropped_files + “Errordateien”
QuarkXpress make ps-files from the filelist of the tableview “dropped_files”.
I add files from the tableview “Errordateien” to “dropped_files” but quarkxpress brings by this files the follow error: “Folder some object wasn´t found. (-120)”
What is wrong with my script?
Please help me…
Many thanks!
on clicked theObject
if name of theObject is "create" then
set tableView to table view "dropped_files" of scroll view "dropped_files" of window "main"
set theDataSource to data source of tableView
set theRows to every data row of theDataSource
set numItems to count of theRows
repeat while numItems > 0
tell window "main"
set theDataRow to item 1 of theRows
set fileName to contents of data cell of theDataRow as string
end tell
my exportPS(fileName)
delete item 1 of theRows
set theRows to every data row of theDataSource
set numItems to count of theRows
end repeat
else if name of theObject is "AddError" then
set tableView to table view "Errordateien" of scroll view "Errordateien" of window "main"
set theDataSource to data source of tableView
set theRows to every data row of theDataSource
set numItems to count of theRows
repeat while numItems > 0
tell window "main"
set theDataRow to item 1 of theRows
set fileName to contents of data cell of theDataRow as text
set addfile to fileName as string
end tell
tell data source of table view "dropped_files" of scroll view "dropped_files" of window "main"
set newZeile to make new data row at end of data rows
set contents of data cell of newZeile to addfile
end tell
delete item 1 of theRows
set theRows to every data row of theDataSource
set numItems to count of theRows
end repeat
(*
else if name of theObject is "errorliste" then
set deleteError to data source of table view "Errordateien" of scroll view "Errordateien" of window "main"
delete every data row of deleteError
*)
end if
end clicked
on exportPS(fileName)
tell application "QuarkXPress Passport"
activate
open alias fileName use doc prefs yes remap fonts ask do auto picture import ask
tell document 1
----------Hier werden die Bilde überprüft-----------
--------------------------------------------------------------
set missList to {}
set modList to {}
try
tell every picture box
set missList to missing of every image
set modList to modified of every image
end tell
end try
if missList contains true or modList contains true then
--if missList contains true then
my missList()
else
--------------------------------------------------------------
--------------------------------------------------------------
my printPS(fileName)
end if
end tell
end tell
end exportPS