field id 1018 of card id 1002 of stack "/A/LiveCode 8.1.3 ƒ/Edit ƒ/pdA.livecode" (tab) 14,31
LineClick in this field sends "RetrieveInScript", which opens the script editor and selects and colors the given range of characters.
Code: Select all
on RetrieveInScript
set the ItemDelimiter to tab
get the HilitedText of fld "FoundList"
put item 1 of it into ObjDesc
put item 2 of it into CharRange
set the ItemDelimiter to comma
put item 1 of CharRange into CharFirst
put item 2 of Range into CharLast
edit the Script of ObjDesc -- 2 times
edit the script of ObjDesc
select last char of fld "Script" of window "revNewScriptEditor 1" -- else last visible line is selected & colored
select char CharFirst to CharLast of fld "Script" of window "revNewScriptEditor 1"
set the TextColor of char CharFirst to CharLast of fld "Script" of window "revNewScriptEditor 1" to „red“
end RetrieveInScript
Peter