Hi
If I have a table with 3 columns how can I get the contents of Col 1 and 3 in a list?
I tried this with no luck…
set tableData to contents of table column 1 and table column 3 of table view “fileList” of scroll view “fileListScroll” of window “mainWin”
Thanks…
Steve
Should have mentioned:
I can do this:
set fileListData to {}
set rowCount to count of every data row of data source 1 of table view "fileList" of scroll view "fileListScroll" of window "mainWin"
repeat with i from 1 to rowCount
set listFileName to contents of data cell 1 of data row i of data source 1 of table view "fileList" of scroll view "fileListScroll" of window "mainWin"
set listParentFolder to contents of data cell 3 of data row i of data source 1 of table view "fileList" of scroll view "fileListScroll" of window "mainWin"
copy {listFileName, listParentFolder} to end of fileListData
end repeat
Was just hoping to see if I could do it in one line.
try this…
set theDataSource to the data source of table view 1 of scroll view 1 of window 1
set the_data to the contents of data cell 1 of data rows of theDataSource
Note: data cell 1 is the column number, or you can give it its applescript name like data cell “columnName”