Hello there, as whenever I hit a stone wall and cannot go up, over, or around it, I come begging to the applescript forums. I am designing an application with a NSTable in it. The table will show a list of files in a certain folder, and will allow the user to manipulate the files in that folder. I can get all the file names and paths and such to appear in the table, however, I am unsure of how I can…
…allow the user to click on one of those names (highlight it) and then either a. double click it and/or b. click a seperate button to call a different fuction where the name they have highlighed would be a variable. Basically, how I can turn a value in the table into a variable I can use. I have started with stuff I’ve pieced together here:
on selection changed theObject
if name of theObject is "scrolling view" then
set theWindow to window of theObject
set selectedDataRows to selected data rows of theObject
if (count of selectedDataRows) = 0 then
my clearDataVariable(theWindow)
set enabled of button "play" of theWindow to false
else
my setDataVariable(theWindow, item 1 of selectedDataRows)
set enabled of button "play" of theWindow to true
end if
end if
end selection changed
on setDataVariable(theWindow, theRow)
tell "Finder"
display dialog "Something is working"
end tell
end setContactInfo