View Single Post
Old 02-21-2018, 11:10 AM   #1172
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,268
Default

Quote:
Originally Posted by HighVoltage View Post
I have a few scripts to select tracks, but your script doesn't update when using
reaper.SetOnlyTrackSelected(track)

(not even if i insert a 40914 command as last touched track.)

I have to manually click it with mouse. Is there a special code that i need to the script to know i have selected a track?
Track Inspector looks for the undo entries.
you can create undo named "Change track selection" in your script.

you can do:

Code:
reaper.Undo_BeginBlock()	  
... your code ...
reaper.Undo_EndBlock("Change track selection", -1)
heda is offline   Reply With Quote