Thanks for all the help.

It solved some of the issues. I do not have any Red items left in the script. And sending chords to BIAB and browse folder for reapeaks work.

But there are still problems importing the tracks. Reaper still crashes and it does not matter which track I select it only tries to import track nr 1 the bass track, It imports the track then crashes. If I select another track it import track 1 the bass track..
It is another crash this time. Log: --------

Error: Biab track injector GUI.lua:2487: attempt to perform arithmetic on a nil value (global 'ppqpos')

Stack traceback:
ReaTrak_Core.lua:93: in metamethod '__add'
Biab track injector GUI.lua:2487: in function 'import_sel_mid_trk_btn_click'
Biab track injector GUI.lua:1546: in function 'import_all_chk_tracks_btn_click'
Class - Button.lua:138: in method 'onmouseup'
ReaTrak_Core.lua:887: in field 'Update'
ReaTrak_Core.lua:440: in field 'Main_Update_Elms'
ReaTrak_Core.lua:307: in function <...rs\hakan\AppData\Roaming\REAPER\Scripts\ReaTrak_Core.lua:303>
[C]: in function 'xpcall'
ReaTrak_Core.lua:303: in function <...rs\hakan\AppData\Roaming\REAPER\Scripts\ReaTrak_Core.lua:302>

I will rest with this for some time now.
Thanks again.