Can anyone confirm if it is possible to click on a line in a table field as the trigger to carry out a piece of code.
At the moment, I click on the line and use a button to detect the hilited line and do the code bit.
Why use two clicks if one will do?
Any ideas?
The actual code I use at the moment, with a button is :-
on mouseUp
global TableResult
set the itemdelimiter to tab
put the hilitedline of field "DaySkyResultsTable" into selectedLineInt --Get the selected row number
set the itemdelimiter to tab
put line selectedLineInt of field "DaySkyResultsTable" into itemsInFieldLine
put item 1 of ItemsInFieldLine into field "CurrentRoom"
put item 2 of ItemsInFieldLine into field "DayLightFactorFLD"
put item 3 of ItemsInFieldLine into field "WglazedArea"
put item 4 of ItemsInFieldLine into field "AroomArea"
put item 5 of ItemsInFieldLine into field "Rreflectance"
put item 6 of ItemsInFieldLine into field "Mcorrection"
put item 7 of ItemsInFieldLine into field "TglazedTrans"
put item 8 of ItemsInFieldLine into field "ThetaSky"
put item 9 of ItemsInFieldLine into field "FactorH"
put item 10 of ItemsInFieldLine into field "FactorY"
put item 11 of ItemsInFieldLine into field "FactorX"
put item 12 of ItemsInFieldLine into field "FactorD"
put item 13 of ItemsInFieldLine into field "RoomWidth"
put empty into line selectedLineInt of field "DaySkyResultsTable"
End Mouseup
Click and select a line in a table field
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Hi user#606,
you can use the field itself to trigger your mouseup!
Put this into the script of your field:
That's it 
Best
Klaus
P.S.
ANY object can have scripts resp. can be clicked!
you can use the field itself to trigger your mouseup!
Put this into the script of your field:
Code: Select all
on mouseUp
global TableResult
put the selectedtext of me into itemsInFieldLine
set the itemdelimiter to tab
put item 1 of ItemsInFieldLine into field "CurrentRoom"
...
put item 13 of ItemsInFieldLine into field "RoomWidth"
End Mouseup

Best
Klaus
P.S.
ANY object can have scripts resp. can be clicked!